Message multiplexer in NR

#1

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:


It doesn't control the flow dynamically.

Thank you!

0 Likes

#2

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.

0 Likes

#3

Good idea about the context.
Thank you, Nick!

0 Likes