Closed annt0 closed 1 week ago
Apologies for the long delay. Unfortunately I think its going to be difficult to assist without seeing some of your code (there are too many variables here) are you able to provide a reproducible example? (client logs may also be useful).
Closing due to age/inactivity. If this is still an issue and you can provide logs then please feel free to reopen.
I have extended
paho.mqtt.client.Client
in another custom class that I use in my program. The structure of my program is as follows:Main thread with custom MQTT client c1. -- Process 1 (daemon) with custom MQTT client c2.
c1 works correctly, but c2 is unable to send messages with qos2. I have tried two approaches:
threading.Thread
instance that runs a while loop callingloop()
).loop_start()
andloop_stop()
.In the first case, communication stops in c2 at the sending of PUBREC by the broker: The call to PUBLISH by c2 is logged, I see the sending of PUBREC on the broker (Mosquitto), c2 receives PUBREC, but what I noticed while debugging your
client.py
is that something empties theself._out_messages
dictionary, and therefore, the call toself._send_pubrel(mid)
cannot be made. In the second case, c2 successfully publishes the message, but it never arrives at the broker.With lower qos levels, everything works fine. c1 does not have these problems.
Could you tell me what could be causing this? Thank you in advance!