eclipse / paho.mqtt.python

paho.mqtt.python
Other
2.15k stars 724 forks source link

So client.publish() invoked from any thread but main, just fails with no warning or exception? #708

Open Jibun-no-Kage opened 1 year ago

Jibun-no-Kage commented 1 year ago

So client.publish() invoked from any thread but main, just fails with no warning or exception? This is documented via many individuals, all over google. CAN WE GET THIS FIXED???

If I invoke client.publish() on the main thread of my python script, but if client.publish is called by any other thread, nothing happens, it the publish is NEVER sent to the broker.

The on_publish call back fires, a message id is returned that the publish was generated, but the broker never gets the message, have confirmed this behavior. If take the exact same code, and invoke it only on the main thread, everything works! CAN WE GET THIS FIXED????

MattBrittan commented 6 months ago

"have confirmed this behavior" - then please assist us by providing a reproducer (I know we could write this but time is limited, and we are working through a lot of issues, so the simpler it is to replicate the issue the more likely it is that we will be able to progress things).