Critical ! Message is discarded when MQTT out node is in Connection state

I have a flow like this.

Lets take a case.
When I press the inject button and MQTT out node is in connecting state where does my timestamp message go?

I have a similar case where I should not loose any data.

  • In this case how can I do?
  • What is the best practice?

Send the message using the retain flag, then when any device reconnects the last retained topic will be resent. You can also set QOS to 2 to get a handshake

Hi @E1cid Thanks for the prompt reply. My main query is that what happens when the MQTT OUT node is in "connecting state" and a data is sent to the node? Where does that data go? Does the data gets stored somewhere?

If at all the data is not sent. The mqtt node is still in connecting state and doesnt even throw up an error. Now how can I catch that error?
P.S: Error being that the data is not being able to send.

You could queue the messages with the delay node and rate limit, set to a high rate delay. Then use a status node to start flushing the messages, once connected and queue again if disconnected. read the help text on these nodes to see how this would work, there are also many examples of this on the forum, This post may help to

What do you have for the settings of the mqtt-out node?
What do you have for the settings of the mqtt-in node?

It's interesting that the out node is in a 'connecting' state while the in node is connected.

Hi @zenofmud Thanks for the comment. Actually I purposefully simulated this condition and wanted community advice/solution for it. Yes I have misconfigured the settings in MQTT OUT node for it to behave so as in simulating a real world scenario.

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