-
-
Notifications
You must be signed in to change notification settings - Fork 35
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
Auto reconnect #51
Comments
Hello, auto-reconnect is something I want to implement but I am not sure when I will be able to do it. In the meantime it's possible to obtain a similar behaviour by creating a new client object every time. |
@davidepianca98 Will creating a new publisher client object with the same client ID for each connection cause the broker to discard queued messages from the previous connection for that client? If so, then that's the issue as subscriber client might miss the undelivered messages. |
@qwerty470 it should not if clean start is set to false. From the MQTT specification:
The not yet acknowledged packets are part of the session. So if cleans start is set to true, they will be discarded. |
Hi,
The MQTT client works well, but I need to implement auto-reconnect for internet reconnections, server disconnections, and similar issues.
The text was updated successfully, but these errors were encountered: