Delay Node : Enhancement : msg.flush or msg.reset by Topic

This was raised before by Flush delay node by topic and there was some agreement as it was a good idea and then closed a year ago with no action so I will raise it again (and add msg.reset to get same treatment)
I have a case that I have several items in the delay node on a time delay, but I need to remove one (as I am stopping immediately the process it is waiting to timeout then stop).
The delay timer only has a few active items (but could be a few more), and topics at present are 8 but that will grow to at least twice that. Not large numbers but others may want more.
I had thought to flush the delay node and process each message out for those that match topic and reinject those that do not match but it does not include in flushed messages the time remaining (before flush).
Ta

If the delay node is in simple delay mode there is currently no concept of per topic - all messages are just delayed by the time set. If in rate limit mode then the per topic mode does not queue up more than one (the latest) message per topic. Is it that one message you want to flush/reset (per topic) ?

If so then it's not something we can rush in as it would be a breaking change in behaviour - as currently if a msg does arrive with flush or reset set and it happens to also have a topic, then the topic is ignored - wheras now it would not be and could cause unexpected behaviour to existing users.

I am looking for it having effect on time delayed messages, so for this to work, those messages would need a topic.
We could make it non breaking, if msg.flush="topic" as a trigger for flush by topic rather than just msg.flush exists.

If you need to queue or delay (including flush) independently by topic or other property, you might try node-red-contrib-multiple-queue. There is no built-in timing, so it requires external logic to provide the delay, but all the issues related to queueing are handled internally.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.