So I’m trying to implement a way of Queuing data to be sent over MQTT (Or some other FIFO buffer). But if there is no MQTT connection currently can I block the event loop until the connection returns? and if one fails is there a way to push suspend that function and try again so that the data is always sent in the order it was added. I’m not sure if the event loop can be used for this is? or should I just make a circular buffer
Also on a side note is there a way I could save this queue to a config tree?
EDIT: I just thought about it, is it efficient to just run another thread for posting then wait in that thread until the connection returns and the post is successful to stop the other events (data posts) from being popped off?