-
Hello, coming from a previous closed discussion. How to correctly resubscribe to my sensors/5 topic again in onConnectionResumed() method? When I receive no messages, after a while I get in the logs:
But I no longer receive event when I send them, I have to restart the Spring Boot app for it to start working again. How to correctly solves this issue? Is there anything I could try? Thank you.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
According to the log you linked you are reconnection with a clean session
This means that the subscriptions from the previous session are lost and you won't receive any more events. This can be fixed by setting clean session to false. |
Beta Was this translation helpful? Give feedback.
-
Hello! Reopening this discussion to make it searchable. |
Beta Was this translation helpful? Give feedback.
According to the log you linked you are reconnection with a clean session
This means that the subscriptions from the previous session are lost and you won't receive any more events. This can be fixed by setting clean session to false.
.withCleanSession(false)
. You can see this being setup for the examples here