-
Notifications
You must be signed in to change notification settings - Fork 167
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
Resubscribe automatically if automatically reconnecting but session expired #297
Comments
@adamcrane please vote on this if you are interested to turn this into a feature request. |
Yes we would like to turn this into a feature request |
Hi @SgtSilvio , is this ticket about implementing an automatic resubscribe mechanism? The thing about "session expired" confused me a bit. I think it is a bit weird for the client to only support resubscribptions in combination with the Reactive Api and the retry() operator. Why would anyone using the reconnect mechanism not also want to resubscribe to previous topics? Would be great if this was made into a feature request. BTW: Still and nonetheless - best mqtt client library for java out there 👍 |
Currently automatic reconnect only makes sense if you have a session with a sufficient session expiry. As long as the MQTT broker has a session you do not need to resubscribe as the subscriptions are still valid. Generally it is recommended to have a persistent session when having a use case for automatic reconnect. I understand that users expect that automatic reconnect restores the subscriptions in case the session expired, so I added the feature label. I did not remove the question label yet as it is not sure how the subscriptions should be restored.
Should the resubscription also send 3 separate subscribes (most likely in a different order) or a combined subscribe with all topic filters ("a", "b", "c", "a")? |
The current implementation restores the subscriptions grouped as in its original Subscribe packets. For each duplicate subscription to the same topic filter only the last successful subscription is restored. In the above example this would be:
|
@adamcrane @lemoony automatic resubscribe was finally released with version 1.2.0 |
identified with #293
somewhat related to #288
The text was updated successfully, but these errors were encountered: