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_pub with QOS 1 exiting on connection loss instead of queuing message #2187

Closed
JsBergbau opened this issue Apr 21, 2021 · 2 comments

Comments

@JsBergbau
Copy link
Contributor

JsBergbau commented Apr 21, 2021

According to https://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels/

grafik

So according to specification sender stores messages until it is successfully delivered.

Execute mosquitto_pub -t test -h <host> -u <user> -P <PW> -l -q 1

Type messages one by one and see that they are received. No simulate some kind of network failure like the broker going away
sudo iptables -A OUTPUT -d <broker_IP>/32 -j REJECT

Now type some messages again in above window so that mosquitto_pub should deliver it after connection is re-established. However after some time an error appears Error: Publish returned 4, disconnecting.
mosquitto_pub exits and all messages after connection problems are lost.

So is the MQTT specification unclear or is this a bug in mosquitto_pub? Personally I think with QOS 1 message should get queued up to a configurable limit before messages get dropped.

@ralight ralight closed this as completed in 07399c2 Jun 9, 2021
@ralight
Copy link
Contributor

ralight commented Jun 9, 2021

I'm sorry for not having commented here before, you can see that I addressed this a while back and it's now part of the release.

@JsBergbau
Copy link
Contributor Author

Thank you very much. Just tested and it works now as expected.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 11, 2022
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