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

Receiving retained message twice on subscription to multiple topics with one subscribe call #878

Open
rmeissne opened this issue Jan 17, 2025 · 0 comments
Labels
Status: Available No one has claimed responsibility for resolving this issue.

Comments

@rmeissne
Copy link

Hello,

I am running paho-mqtt version: 2.1.0 with Python 3.10.12

a = [("shellyplusuni-a0a3b366fd80/#", SubscribeOptions(qos=2)), ("v1/#", SubscribeOptions(qos=2))]
mqtt_client.subscribe(a)

Subscription with message ID 1: [ReasonCode(Suback, 'Granted QoS 2'), ReasonCode(Suback, 'Granted QoS 2')]
shellyplusuni-a0a3b366fd80 is online
Subscription with message ID 2: [ReasonCode(Suback, 'Granted QoS 2'), ReasonCode(Suback, 'Granted QoS 2')]
shellyplusuni-a0a3b366fd80 is online

Is this expected? I am receiving "shellyplusuni-a0a3b366fd80 is online" twice, which is an output of my on_message handler (this is a retained message within this topic). Topics are not overlapping. I would expect two message IDs, 1 and 2. However, both have the same reason code list.

With two subscribe calls (one topic each), I get:

Subscription with message ID 1: [ReasonCode(Suback, 'Granted QoS 2')]
shellyplusuni-a0a3b366fd80 is online
Subscription with message ID 2: [ReasonCode(Suback, 'Granted QoS 2')]

I would expect exactly the same output when calling subscribe with multiple topics.

Thanks,
Robert

@github-actions github-actions bot added the Status: Available No one has claimed responsibility for resolving this issue. label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Available No one has claimed responsibility for resolving this issue.
Projects
None yet
Development

No branches or pull requests

1 participant