hivemq-mqtt-client icon indicating copy to clipboard operation
hivemq-mqtt-client copied to clipboard

Ability to add a subscription listener to the client builder (like connected and disconnected)

Open richturner opened this issue 4 years ago • 1 comments

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()

richturner avatar Nov 03 '21 22:11 richturner

Is there any likely progress on this? Without this and #687 there is no way of knowing or handling failed resubscribe requests on reconnect.

richturner avatar Jun 18 '25 12:06 richturner