After some discussion elsewhere on this forum (Gate node using Blockly - #10 by Foukk), I have published my take on controlling the flow of messages along a particular path, node-red-contrib-simple-gate. There are lots of ways to do this, but I think a dedicated node with some flexibility might be useful. From the help text, this node
Transmits the input message when in the
openstate and blocks it whenclosed.Messages with the topic
Control Topicare control messages, which set the state of the gate. Control messages can have values representingopen,close,toggle, anddefault.When first deployed or after a
defaultcommand, the gate is in the state defined byDefault State.
The node can be downloaded from npm, GitHub, or the palette manager.
.. well done.. simple but effective