I have searched through the forum but have not found what I am after. I want to read a CSV, parse it and use its data to simulate a sequence of activities to a time-series database. Each line of the CSV includes a delay value that I want to use in a Delay node in order to stage messages at correct intervals. The delay values vary by line. Parsing works fine, but the Delay node seems to be grouping all rows by the msg.delay. In this way all rows with msg.delay = 0 get sent in a burst even though they are not adjacent in the data. Then there is a pause for 2 seconds followed by the one message in the array where msg.delay = 2000. Then there is a 10-second pause followed by a single burst of all messages where msg.delay = 10000. The rows are taken out of order. For demonstration, I replaced the CSV/parsing with an injected array of data that looks similar to my parsed data. I have tried rate limiting, but then I seem to lose the ability to set each message's delay individually. What am I missing?
[{"id":"b4bc804c.84c02","type":"inject","z":"50e1c6b2.548378","name":"","topic":"","payload":"[{\"delay\":0,\"label\":\"Belt Speed\",\"value\":0},{\"delay\":0,\"label\":\"Batch Number\",\"value\":\"Sim1234\"},{\"delay\":2000,\"label\":\"Recipe Name\",\"value\":\"Original Recipe\"},{\"delay\":10000,\"label\":\"Batch Active\",\"value\":1},{\"delay\":0,\"label\":\"Belt Speed\",\"value\":0},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":30},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":62},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":90},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":123},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":128},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":132},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":134},{\"delay\":10000,\"label\":\"Belt Speed\",\"value\":136}]","payloadType":"json","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":690,"y":120,"wires":[["e5a730ba.3694d"]]},{"id":"e5a730ba.3694d","type":"split","z":"50e1c6b2.548378","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":820,"y":140,"wires":[["c62473ad.c799e"]]},{"id":"e2caaa59.5a47c8","type":"debug","z":"50e1c6b2.548378","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":1070,"y":300,"wires":[]},{"id":"490c8ada.654ee4","type":"delay","z":"50e1c6b2.548378","name":"delay","pauseType":"delayv","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":930,"y":260,"wires":[["e2caaa59.5a47c8"]]},{"id":"c62473ad.c799e","type":"change","z":"50e1c6b2.548378","name":"set delay","rules":[{"t":"set","p":"delay","pt":"msg","to":"payload.delay","tot":"msg"},{"t":"delete","p":"payload.delay","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":940,"y":200,"wires":[["490c8ada.654ee4"]]}]