hivemq-mqtt-client
hivemq-mqtt-client copied to clipboard
Ability to add a subscription listener to the client builder (like connected and disconnected)
Problem or use case
When the client auto re-connects it tries to re-subscribe previous subscriptions (at least it does when the conack doesn't report a session is present) but these subscriptions can fail (in my case authorisation rules have changed on the broker which is why the client was disconnected by the broker).
It doesn't seem possible to get notified of these re-subscribe failures.
Preferred solution or suggestions
It would be great if we could add a subscribeListener to the client builder similar to the connected and disconnected listeners. This would allow us to act on the failure just like calling client subscribeWith()
Is there any likely progress on this? Without this and #687 there is no way of knowing or handling failed resubscribe requests on reconnect.