Skip to content
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

breaking change in paho.mqtt.python #39

Closed
mitchell-pioneer opened this issue Jun 20, 2024 · 1 comment · Fixed by #52
Closed

breaking change in paho.mqtt.python #39

mitchell-pioneer opened this issue Jun 20, 2024 · 1 comment · Fixed by #52
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mitchell-pioneer
Copy link
Contributor

mitchell-pioneer commented Jun 20, 2024

I beleve there is a breaking change in paho.mqtt for version 2

from there doc

Add version to user callbacks (on_publish, on_connect…). tl; dr:
add mqtt.CallbackAPIVersion.VERSION1 as first argument to [Client()]

https://eclipse.dev/paho/files/paho.mqtt.python/html/migrations.html

change

        mqttc = mqtt.Client(
            clientid,
            clean_session=(args.mqtt_qos == 0),
            userdata={"qos": args.mqtt_qos},
         )

to

        mqttc = mqtt.Client(
            mqtt.CallbackAPIVersion.VERSION1,
            clientid,
            clean_session=(args.mqtt_qos == 0),
            userdata={"qos": args.mqtt_qos},
         )
@gavinying
Copy link
Owner

Hi @mitchell-pioneer , noted the breaking changes on paho v2, thanks.
Currently, I am doing a major refactoring on master branch, will tackle this issue later for sure.
Stay tuned.

@gavinying gavinying added enhancement New feature or request good first issue Good for newcomers labels Jul 10, 2024
@gavinying gavinying self-assigned this Jul 13, 2024
@gavinying gavinying linked a pull request Jul 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants