Try this
1 should follow 2
3 can come any time
4 and 5 are sent at same time
6 an7 are sent 1 millisecond apart
it seems 1,2 and 4,5 pair up correctly
[{"id":"8be22f30.d15428","type":"inject","z":"c791cbc0.84f648","name":"test race","props":[{"p":"payload"},{"p":"topic","v":"false","vt":"bool"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":160,"y":1560,"wires":[["26398477.34fec4","660c5560.772334","22efed7a.0eb59a","5ea3f2ef.26249c"]]},{"id":"26398477.34fec4","type":"function","z":"c791cbc0.84f648","name":"randomise sending","func":"for( let i =0; i<20; i++){\n let number = i+1;\n setTimeout(() => {node.send(Object.assign(msg,{number}))}, Math.floor((Math.random() * 100) + 1));\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":170,"y":1620,"wires":[["15379e66.503202"]]},{"id":"660c5560.772334","type":"function","z":"c791cbc0.84f648","name":"randomise sending","func":"for( let i =0; i<20; i++){\n let number = i+1;\n setTimeout(() => {node.send(Object.assign(msg,{number}))}, Math.floor((Math.random() * 100) + 1));\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":170,"y":1660,"wires":[["f849c5d3.1c5b88"]]},{"id":"22efed7a.0eb59a","type":"function","z":"c791cbc0.84f648","name":"randomise sending","func":"for( let i =0; i<20; i++){\n let number = i+1;\n setTimeout(() => {node.send(Object.assign(msg,{number}))}, Math.floor((Math.random() * 100) + 1));\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":170,"y":1720,"wires":[["7c036555.65393c","29b8453f.b97e02"]]},{"id":"5ea3f2ef.26249c","type":"function","z":"c791cbc0.84f648","name":"randomise sending","func":"for( let i =0; i<20; i++){\n let number = i+1;\n setTimeout(() => {node.send(Object.assign(msg,{number}))}, Math.floor((Math.random() * 100) + 1));\n}\nreturn null;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":170,"y":1820,"wires":[["94fe0b88.effc6","f97176ac.df797"]]},{"id":"15379e66.503202","type":"change","z":"c791cbc0.84f648","name":"1 and 2","rules":[{"t":"set","p":"payload","pt":"msg","to":"[\t {\t \"payload\":\"initialize\",\t \"topic\":\"control\",\t \"number\":\"1 - \" & number\t },\t {\t \"payload\":\"changeState\",\t \"topic\":\"control\",\t \"number\":\"2 - \" & number\t }\t]","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":400,"y":1620,"wires":[["e0fe9f92.abeff8"]]},{"id":"f849c5d3.1c5b88","type":"change","z":"c791cbc0.84f648","name":"3","rules":[{"t":"set","p":"payload","pt":"msg","to":"changeState","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"number","pt":"msg","to":"\"3 - \" & number","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1660,"wires":[["e0fe9f92.abeff8"]]},{"id":"7c036555.65393c","type":"change","z":"c791cbc0.84f648","name":"4","rules":[{"t":"set","p":"payload","pt":"msg","to":"changeState","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"number","pt":"msg","to":"\"4 - \" & number","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1720,"wires":[["e0fe9f92.abeff8"]]},{"id":"29b8453f.b97e02","type":"change","z":"c791cbc0.84f648","name":"5","rules":[{"t":"set","p":"payload","pt":"msg","to":"changeState","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"number","pt":"msg","to":"\"5 - \" & number","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1760,"wires":[["e0fe9f92.abeff8"]]},{"id":"94fe0b88.effc6","type":"change","z":"c791cbc0.84f648","name":"6","rules":[{"t":"set","p":"payload","pt":"msg","to":"changeState","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"number","pt":"msg","to":"\"6 - \" & number","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1820,"wires":[["e0fe9f92.abeff8"]]},{"id":"f97176ac.df797","type":"delay","z":"c791cbc0.84f648","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":250,"y":1860,"wires":[["8f44aafb.e84dc8"]]},{"id":"e0fe9f92.abeff8","type":"function","z":"c791cbc0.84f648","name":"split array with no topic","func":"if (Array.isArray(msg.payload) && !msg.topic){\n msg = [msg.payload]\n}\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","x":690,"y":1660,"wires":[["ae9bcb92.26cb38"]]},{"id":"8f44aafb.e84dc8","type":"change","z":"c791cbc0.84f648","name":"7","rules":[{"t":"set","p":"payload","pt":"msg","to":"changeState","tot":"str"},{"t":"set","p":"payload","pt":"msg","to":"control","tot":"str"},{"t":"set","p":"number","pt":"msg","to":"\"7 - \" & number","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":390,"y":1860,"wires":[["e0fe9f92.abeff8"]]},{"id":"ae9bcb92.26cb38","type":"change","z":"c791cbc0.84f648","name":"","rules":[{"t":"move","p":"number","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":670,"y":1740,"wires":[["ae15bf43.7500d"]]},{"id":"ae15bf43.7500d","type":"debug","z":"c791cbc0.84f648","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":650,"y":1780,"wires":[]}]
the output is
number sent - order sent