I am (re-)opening a new discussion as this one is quite old but I am facing a similar issue I think.
Context: - Node-RED version : 2.0.6 - NodeJS version: 16
I have developed a custom node which contains one input and 2 outputs.
One of the output is used to send the results of the input commands and the other one is used to send updates received from an internal callback method.
① The input -> output seems to work as expected all the time.
② About the callback, it is invoked at a regular interval (~15 every seconds).
In this callback the node.send() function is used to send the messages to the second output.
=> So far so good. After a clean restart of Node-RED or even after doing some redeployment of the flow the messages are well received in the callback function and sent to the second output. I can verify it in the debug node.
But .. I have realized monitoring the second output and the console logs (to trace the messages received in the callback) that the messages stop being sent in the Node-RED flow and I have some data gaps.
I can see the messages in the console so I am sure they are received inside the callback. But they are not sent to the debug node (connected to my custom node second output).
Basically what I am doing in the callback.
1 - I forge a new message
2 - I log it into the console for tracing in debug mode the message (using NR node.debug() helper function)
3 - I send the message using NR node.send()
This is working fine but after some time nothing is sent by the send() function.
I have no idea why after a couple of days working fine (but it can vary to less than a day or a couple of hours) the messages are not flowing in the Node-RED environment but are still traced in my console !!
Am I missing something fundamental is the way Node-RED messages should be sent in the context of a callback method ? Are there some cases the messages can be dropped by the node.send function ?
Thank you very much for any inputs that could help me to clarify how to troubleshoot and fix this issue as it is a blocking point now in our development.