My first Node-RED node ever was the node-red-contrib-msg-resend. I have now implemented a series of feature requests, so it has become a rather big makeover. So time for version 1.0.0:
msg.resend_messagesallows us to change the resending modus of this node:
true, the node will resend all input messages.
false, the node will simply pass-through all input messages (without resending them).
The "Wait for explicit resend_messages=true message" option in the config screen can be used to specify in which modus this node should start: resending or pass-through.
It is possible to inject messages that don't obey the current resending mode of this node:
msg.resend_force: This msg should always be resend, even if the node is in pass-through modus.
msg.resend_never: This msg should never be resend, even if the node is in resending modus.
By injecting a message with
msg.resend_last_msg, the last previous message (if available) will be processed again by this node.
Note that all those options can be optionally topic dependent.
If anybody wants to test it, you can install the beta from my Github repo from within your .node-red folder:
npm install bartbutenaers/node-red-contrib-msg-resend
If I haven't got any feedback in a week, then I assume there are no breaking changes and I will publish this node on NPM...