-
Notifications
You must be signed in to change notification settings - Fork 727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MQTTv5 and QoS 2 does not work #696
Comments
Looks like this is a bug in the handling of the PUBREL messages, where with MQTTv5 after the packet identifier it will now include a reason code, and property length. The pack error is because there is these new trailing bytes after the identifier. Quick work around is just passing the first 2 bytes to unpack: client.py:3348 Better long term would be parsing the PUBREL reason code out as it can contain an error value. |
I have the same problem when publishing my messages with QoS=2 while QoS=1 works fine. The solution provided by @naknz works fine. python -c 'line_number=3238; import paho.mqtt.client as target; from pathlib import Path; print(target.__file__); line_text = Path(target.__file__).read_text().split("\n")[line_number-1]; expected = " mid, = struct.unpack(\"!H\", self._in_packet['\''packet'\''])"; print(line_text); print(expected); print(line_text == expected)' You may have to adjust the line_number for other versions. |
Thank you, this is now fixed and will be in the next release. |
Hey @ralight, when will the next release happen? I really needed this QoS 2 for a product launch. |
I also hit this issue. @ralight when can we expect a release to occur with this fix? It looks like there hasn't been a release in quite some time. Is this project still actively maintained? |
Same here. Happy to help in anything needed to close this. |
@ralight When is a new release expected? |
FYI, installing from branch 1.6.x fixed the issues for me. |
@drsantos89 How to install the module from the 1.6.x branch? I don't understand, what version is it? speak spanish?, i from chile! |
I ran an update in my project and noticed that banch 1.6.x was removed. |
i guess it was removed because it was merged |
Great. Can't wait to see 2.0 becoming stable release. |
You can also use the 2.0.0rc2 available on PyPI: https://pypi.org/project/paho-mqtt/2.0.0rc2/ If not regressions are found on this release candidate, the 2.0 will be release in February. |
@PierreF what day in February?, 1st? |
@PierreF 2.0.0rc2 is stable? |
Hi, I've been testing both version 1.3 and 2.0 for a project and it looks like the issue persists. Paho 2.0 publisher:
I've noticed it when trying to publish with QoS 2, the current code still doesn't reply to PUBREL as follows: Version 1.3Version 2.0Is my client somehow wrong for QoS 2? |
Hi,
I noticed currently MQTTv5 and QoS 2 does not work.
I found a similar issue in MQTTv3 days (6 years ago!): #103,
and are there similar problems in MQTTv5?
Distro: Ubuntu 22.04(amd64)
Python: 3.10.6
Paho: paho-mqtt 1.6.1
MQTT Broker : EMQX Community Edition docker image (emqx/emqx:4.4.11)
Here are my stupid programs.
If I give '1' for the argument, asking to use QoS 1, it works.
So, I'm wondering there is something wrong in QoS 2 code path.
server side
client side
The text was updated successfully, but these errors were encountered: