Closed harrandt closed 5 months ago
Hi there,
Thanks for this issue and sorry for the late reply! Let's try to get to the bottom of this 👍
As far as I know, aiomqtt doesn't touch the _inflight_messages
counter. The only time we're doing something related is when we set paho-mqtt's limit on inflight messages with max_inflight_messages_set()
. Did you already try to reproduce a negative counter using paho-mqtt directly?
paho-mqtt decrements the _inflight_messages
counter in two places:
Good point, thanks. I re-wrote the example to use only paho and the issue is also visible then.
I created a ticket in the paho tracker. https://github.com/eclipse/paho.mqtt.python/issues/805.
Thanks for reporting back!
Python 3.9, Windows 10 aiomqtt 1.2.1 paho-mqtt 1.6.1
The
client._client._inflight_messages
counter of the paho client is negative and decreasing with QoS 2 for publish and subscribe on the same topic. Other combinations of the QoS levels will not show the issue.The log seems to indicate that the published messages are transfered successfully:
Here is a MCVE