This update adds the option of persistence for the state of the gate and the contents of the queue. (See Github, issue #6 )
Previously, the node would enter the Default State on startup, either when first deployed in the editor, re-deployed as part of a modified flow or entire workspace, or when Node-RED is restarted by the user or by a system service. Now, however, the user can select the
Restore from saved state option (checkbox) in the edit dialog. Then, if a persistent form of context storage has been enabled in the Node-RED settings.js file, the node will attempt to enter the state last saved in the node context and restore the contents of the message queue. It will use the Default State (with an empty queue) only if no saved state is available.
This update also corrects a bug, similar to the one in
node-red-contrib-simple-gate, that would cause an error when the
msg.topic is not a string.
Please report bugs or issues here or on GitHub.