Issues in persisting messages in MQTT Broker using NodeRed MQTT Nodes

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