Msg.flush =1 not working to flush rate limit node if connected through link nodes?

Is this expected and known or is a bug?

I struggled for so long why my flow is not working, but accidentally found out that the msg.flush works only if DIRECTLY connected to the rate limit node.

flush

the two top flows are identical, but one is connected with link node and other directly.
the one with link node 'adds' a message, and ends up sending out double the number of outputs from the split node.

or am i making any mistake ?

[{"id":"4ea54cf4d8d4b477","type":"delay","z":"400bc99efba52b23","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760,"y":5120,"wires":[["f8319cacfeab6fbd"]]},{"id":"e7117d68cc152fd8","type":"split","z":"400bc99efba52b23","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","property":"payload","x":580,"y":4960,"wires":[["00e7be9d278050ed","4ea54cf4d8d4b477"]]},{"id":"893c66cda16a3528","type":"link in","z":"400bc99efba52b23","name":"link in 322","links":["d142f452f605bfc1"],"x":605,"y":5120,"wires":[["4ea54cf4d8d4b477"]]},{"id":"f8319cacfeab6fbd","type":"delay","z":"400bc99efba52b23","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":960,"y":5120,"wires":[["b50b7fbb45f7c33e"]]},{"id":"f1bb14a36ca6596f","type":"inject","z":"400bc99efba52b23","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"[9,8,7,6,5,4,3,2,1,0]","payloadType":"json","x":420,"y":4960,"wires":[["e7117d68cc152fd8"]]},{"id":"00e7be9d278050ed","type":"delay","z":"400bc99efba52b23","name":"","pauseType":"rate","timeout":"5","timeoutUnits":"seconds","rate":"1","nbRateUnits":"5","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":760,"y":4960,"wires":[["3e0628594eb34a78"]]},{"id":"b50b7fbb45f7c33e","type":"debug","z":"400bc99efba52b23","name":"debug 2935","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1150,"y":5120,"wires":[]},{"id":"0ebb3ae15c4e8320","type":"function","z":"400bc99efba52b23","name":"Flush","func":"return {flush:1};","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":5020,"wires":[["00e7be9d278050ed","d142f452f605bfc1"]]},{"id":"3e0628594eb34a78","type":"delay","z":"400bc99efba52b23","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":960,"y":4960,"wires":[["e14a1c0858c3d9d1","020e962ffd3d6137"]]},{"id":"e7c327ea272c72fb","type":"junction","z":"400bc99efba52b23","x":440,"y":5000,"wires":[["0ebb3ae15c4e8320"]]},{"id":"d142f452f605bfc1","type":"link out","z":"400bc99efba52b23","name":"link out 470","mode":"link","links":["893c66cda16a3528"],"x":545,"y":5060,"wires":[]},{"id":"e14a1c0858c3d9d1","type":"debug","z":"400bc99efba52b23","name":"debug 2934","active":true,"tosidebar":false,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"","statusType":"counter","x":1150,"y":4960,"wires":[]},{"id":"020e962ffd3d6137","type":"junction","z":"400bc99efba52b23","x":1040,"y":4980,"wires":[["e7c327ea272c72fb"]]}]

That is because the link node adds some msg properties. you would need to delete msg._msgid and msg._event, or have another function node returning flush again.

In fact it is not necessary to delete msg._msgid, just msg._event.

Because the message is not empty apart from the flush, the Delay node assumes that it is supposed to add it to the queue.

but the function node is set to send only flush, nothing else.

that is what i also thought, so i moved the function node closer to the rate limit node and link node before that. and it works.

Indeed, I was on the hop and posted while doing other stuff. msg._msgid is the only other property (except flush) allowed that will not trigger the delay node to add a new message to the queue.