spin
spin copied to clipboard
Rumqttc Potential Issue
Having an eventloop in publish function is not an optimal way of ensuring messages are published to MQTT broker i.e. we will exit the eventloop poll on receipt of publish, puback, pubcomp message but this message is not necessarily correlated to the message a publish call published to the broker always, the message can be from another parallel call going on, as eventloop is shared at client level and a client can make multiple calls in parallel. This results in publish function returning a false (highly likely) confirmation that the message it received was published, making it an unreliable way of confirming message publishing.