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

mosquitto_rr -R does not ignore stale messages #2893

Closed
jwinder-ca opened this issue Sep 12, 2023 · 1 comment
Closed

mosquitto_rr -R does not ignore stale messages #2893

jwinder-ca opened this issue Sep 12, 2023 · 1 comment

Comments

@jwinder-ca
Copy link

mosquitto_rr -R is documented that it will not print stale messages (those with retain set), but it does print the stale message and returns without waiting for the response topic (a non-retained occurrence of the topic).

I tested on a Fedora Linux with Mosquitto version 2.0.17 and a different Linux device with Mosquitto version 2.1.0

[user@fedora ~]$ mosquitto_pub -t 'resp' -n -r
[user@fedora ~]$ mosquitto_pub -t 'resp' -m '0' -r
[user@fedora ~]$ mosquitto_rr -R -t 'cmd' -e 'resp' -m '1' -d
Client null sending CONNECT
Client auto-B1257093-19F5-5800-CCA1-B115F3ED29DC received CONNACK (0)
Client auto-B1257093-19F5-5800-CCA1-B115F3ED29DC sending SUBSCRIBE (Mid: 1, Topic: resp, QoS: 0, Options: 0x00)
Client auto-B1257093-19F5-5800-CCA1-B115F3ED29DC received SUBACK
Client auto-B1257093-19F5-5800-CCA1-B115F3ED29DC sending PUBLISH (d0, q0, r0, m2, 'cmd', ... (1 bytes))
Client auto-B1257093-19F5-5800-CCA1-B115F3ED29DC received PUBLISH (d0, q0, r1, m0, 'resp', ... (1 bytes))
0
[user@fedora ~]$

@ralight
Copy link
Contributor

ralight commented Sep 13, 2023

You're quite right. I looked in the code and saw a big FIXME - that's now done and will be part of 2.0.18.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants