# Message multiplexer in NR

**URL:** <https://discourse.nodered.org/t/message-multiplexer-in-nr/5833>\
**Category:** General\
**Created:** [15 December 2018 18:32 UTC](https://discourse.nodered.org/t/message-multiplexer-in-nr/5833 "2018-12-15T18:32:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [15 December 2018 18:32 UTC](https://discourse.nodered.org/t/message-multiplexer-in-nr/5833/1 "2018-12-15T18:32:14Z")

</div>

Hi guys,

Is there message multiplexer in Node-RED?  
Like a signal multiplexer in electronics: one type of messages can control flow of all other types of messages.  
Example:  
Control message has topic 'control'.  
2 other message types have topics 'fruits' and 'vegetables'.  
Once 'control' gets payload 'strict' the fruits go to output 1 and vegetables go to output 2.  
Once 'control' gets payload 'relax' all other messages go to output 3 (or 1 doesn't matter for the example).

I found router:

> **[node-red-contrib-msg-router](https://flows.nodered.org/node/node-red-contrib-msg-router)**
>
> A Node Red node to route messages between nodes

  
It doesn't control the flow dynamically.

Thank you!

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [15 December 2018 19:03 UTC](https://discourse.nodered.org/t/message-multiplexer-in-nr/5833/2 "2018-12-15T19:03:17Z")

</div>

I use normal Switch nodes and Flow context to provide any sort of dynamic routing in my flows. I'm sure that could be used to provide the sort of thing you're looking for. You may need a couple tiers of Switch nodes depending on the different states you want to represent.

---

<div class="post-metadata">

**Author:** ![igrowing](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/igrowing/32/663_2.png) [@igrowing](https://discourse.nodered.org/u/igrowing)\
**Post date:** [15 December 2018 20:30 UTC](https://discourse.nodered.org/t/message-multiplexer-in-nr/5833/3 "2018-12-15T20:30:29Z")

</div>

Good idea about the context.  
Thank you, Nick!
