You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We use MQTT server with Keycloak requiring us to generate a token with Keycloak before we start a connection between our spring boot application and MQTT. On occasions for whatever reason that connection gets dropped, current behaviour means it will try to reconnect when the next message is published. When this occurs the existing connection details are used which potentially contains an expired token.
There doesn't seem to be to way that we can alter the connection options or at least have some flexibility when the connection is lost. My proposal includes something that has already been implemented in the MqttPahoMessageDrivenChannelAdapter class where a MqttConnectionFailedEvent is published. The same would be published on the producer side in the MqttPahoMessageHandler class enabling us to have some sort of flexibility in dealing with lost connection issues.
The text was updated successfully, but these errors were encountered:
I find this as a valid request as long as the connectionLost(Throwable cause) is called for an expired token reason, so you really can catch that MqttConnectionFailedEvent and correct MqttConnectOptions on the DefaultMqttPahoClientFactory.
We use MQTT server with Keycloak requiring us to generate a token with Keycloak before we start a connection between our spring boot application and MQTT. On occasions for whatever reason that connection gets dropped, current behaviour means it will try to reconnect when the next message is published. When this occurs the existing connection details are used which potentially contains an expired token.
There doesn't seem to be to way that we can alter the connection options or at least have some flexibility when the connection is lost. My proposal includes something that has already been implemented in the MqttPahoMessageDrivenChannelAdapter class where a MqttConnectionFailedEvent is published. The same would be published on the producer side in the MqttPahoMessageHandler class enabling us to have some sort of flexibility in dealing with lost connection issues.
The text was updated successfully, but these errors were encountered: