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

**URL:** <https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663>\
**Category:** General\
**Tags:** rate-limit, link-nodes\
**Created:** [26 February 2025 11:47 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663 "2025-02-26T11:47:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [26 February 2025 11:47 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663/1 "2025-02-26T11:47:54Z")

</div>

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](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/a/6aec4b8fb41d60285f776963080844754a23e83b.gif)

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 ?

```auto
[{"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"]]}]

```

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 February 2025 12:09 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663/2 "2025-02-26T12:09:16Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)\
**Post date:** [26 February 2025 12:18 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663/3 "2025-02-26T12:18:19Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![smanjunath211](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/smanjunath211/32/95742_2.png) [@smanjunath211](https://discourse.nodered.org/u/smanjunath211)\
**Post date:** [26 February 2025 12:22 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663/4 "2025-02-26T12:22:56Z")

</div>

> [@Colin](#):
>
> Because the message is not empty

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/8/9/89a1d3246b6998591c2ca5d774a710405485c6ca.png)

> [@E1cid](#):
>
> link node adds some msg properties.

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.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [26 February 2025 12:32 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663/5 "2025-02-26T12:32:58Z")

</div>

> [@Colin](#):
>
> n fact it is not necessary to delete msg.\_msgid,

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 March 2025 12:33 UTC](https://discourse.nodered.org/t/msg-flush-1-not-working-to-flush-rate-limit-node-if-connected-through-link-nodes/95663/6 "2025-03-12T12:33:09Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
