Issues in persisting messages in MQTT Broker using NodeRed MQTT Nodes

If you already do it with a FIFO why are you asking for help?

I wanted to know what was the right way to do it or if there was some better way. I also wanted to say it to help anyone who needs to visit this thread over the coming years

OK, I think a FIFO is certainly the way to do it. Which sort of FIFO doesn't really matter provided it meets your requirements. One implementation detail is not to bother putting in any extra logic to test whether the FIFO is empty when a new message comes along. It is not worth the effort and the logic gets surprisingly complex. Just shove the new in the FIFO and then you can trigger the polling if appropriate which will immediately send it and take it out.

1 Like

Also send each one before removing from the FIFO, and make sure that the recipient can cope with messages being repeated as, if the sender is reset after sending but before removing, then that message will be sent again later.

1 Like

hi
is this unsubscribing issue resloved?
and regarding disabling the flow will ir unsubscribe? or will it just disonnect ?
and when we stop the nodered itself from console will the client gets unsubsribe and then disconnect or just disconnects?
thanks in advance for your time

Please stick to one thread.