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 client implements QoS 1 a zero or more times and QoS 2 as at most once #188

Open
fhars opened this issue Jun 7, 2016 · 1 comment
Labels
Component: libmosquitto Type: Enhancement A new feature for a minor or major release.

Comments

@fhars
Copy link

fhars commented Jun 7, 2016

In both cases, an adversary scheduler will run the code right up to the if(mosq->on_message){ and then reboot the system. When the clients reconnects with clean session equal to 0, the server will regard the message as completely acknowledged, while the application will never have seen the message at all.

This is related to #118, and there are several bad choices here. It may actually be impossible to implement QoS 2 correctly without writing the message to persistent storage before sending the PUBREC message.

@ralight
Copy link
Contributor

ralight commented Jun 7, 2016

I'm not familiar with adversary schedulers, but the point stands - if something happens to stop the client before that call then the broker will not retry.

I'd be happy to receive a pull request for (optional) persistence support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: libmosquitto Type: Enhancement A new feature for a minor or major release.
Projects
None yet
Development

No branches or pull requests

3 participants