Issue when doing manual join to change join char

If I use a manual join (in order to change the payload join char) it doesn't handle out-of-time-order messages correctly

[{"id":"c2cffd31.8fc8c","type":"inject","z":"703a9780.dc66f8","name":"","topic":"","payload":"A,B,C,D","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":220,"y":120,"wires":[["75a0865.fc2ab78"]]},{"id":"75a0865.fc2ab78","type":"split","z":"703a9780.dc66f8","name":"","splt":",","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":350,"y":120,"wires":[["e45d5ff8.3ee95"]]},{"id":"e8222e5a.c21be","type":"debug","z":"703a9780.dc66f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1030,"y":40,"wires":[]},{"id":"e45d5ff8.3ee95","type":"switch","z":"703a9780.dc66f8","name":"","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"B","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":470,"y":120,"wires":[["2cb71145.dacbde"],["ec7eb7d0.d5b0f8"]]},{"id":"2cb71145.dacbde","type":"change","z":"703a9780.dc66f8","name":"B -> b","rules":[{"t":"set","p":"payload","pt":"msg","to":"b","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":610,"y":80,"wires":[["babddf8f.df9d8"]]},{"id":"f3b4d366.8a421","type":"join","z":"703a9780.dc66f8","name":"","mode":"auto","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1030,"y":120,"wires":[["549ff98e.ff2608"]]},{"id":"ec7eb7d0.d5b0f8","type":"function","z":"703a9780.dc66f8","name":"","func":"\nreturn msg;","outputs":1,"noerr":0,"x":915,"y":120,"wires":[["f3b4d366.8a421","e8222e5a.c21be","1b410f87.c2cd9"]],"icon":"node-red/inject.svg","l":false},{"id":"549ff98e.ff2608","type":"debug","z":"703a9780.dc66f8","name":"Auto","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1210,"y":120,"wires":[]},{"id":"babddf8f.df9d8","type":"delay","z":"703a9780.dc66f8","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":800,"y":80,"wires":[["ec7eb7d0.d5b0f8"]]},{"id":"1b410f87.c2cd9","type":"join","z":"703a9780.dc66f8","name":"","mode":"custom","build":"string","property":"payload","propertyType":"msg","key":"topic","joiner":":","joinerType":"str","accumulate":false,"timeout":"","count":"","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":1030,"y":200,"wires":[["3ad749bc.029666"]]},{"id":"3ad749bc.029666","type":"debug","z":"703a9780.dc66f8","name":"Manual","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":1220,"y":200,"wires":[]},{"id":"88467ff3.0afe8","type":"comment","z":"703a9780.dc66f8","name":"Forces one msg part out of time order","info":"","x":630,"y":40,"wires":[]}]

This is a contrived small example to show a problem I'm having while parsing an HTML table

[edit]
Found a workaround - insert a change node after the split and change the msg.parts.ch at that point in the flow to my : - I can then use the join in auto mode
[/edit]

1 Like

Or put the join in key/value pairs mode and provide unique topics for each value.