gnodet-bot commented on code in PR #26476: URL: https://github.com/apache/camel/pull/26476#discussion_r4020409824
########## docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_23.adoc: ########## @@ -971,6 +971,27 @@ Deployments that relied on the previous behaviour — a development cluster with certificate, for example — must either configure a truststore or set `camel.knative.client.ssl.trust.all` explicitly. `KnativeOidcClientOptions` extends this class and is affected the same way. +=== camel-paho + +When `automaticReconnect=true` and the MQTT broker reconnects, the consumer now restarts the route +if the post-reconnect `subscribe()` call fails. Previously a failed resubscription (for example, +when the broker does not send a SUBACK and the Paho keepAlive timer triggers `MqttException 32000`) +was only logged at ERROR level with no recovery action, leaving the route in `Started` state while +silently consuming no messages (zombie state). + +If the resubscribe fails and the consumer owns the MQTT client (the default), it automatically stops +and restarts the route to force a clean reconnect. With `cleanSession=true`, the consumer unsubscribes +before disconnecting; with `cleanSession=false`, it keeps the durable subscription. Routes using a +user-provided client are not affected by this change. Configuring Camel's `SupervisingRouteController` +allows the framework to keep retrying with exponential backoff until the broker recovers: Review Comment: **Doc gap vs. the `camel-paho-mqtt5` section:** The MQTT5 counterpart at line 1003 includes the sentence "If the restart also fails (for example, the broker is still unavailable), the route is left in `Stopped` state." — which is equally true here and is the key piece of information an upgrading user needs to understand the failure mode when `SupervisingRouteController` is not configured. Please add it: ```suggestion and restarts the route to force a clean reconnect. If the restart also fails (for example, the broker is still unavailable), the route is left in `Stopped` state. With `cleanSession=true`, the consumer unsubscribes before disconnecting; with `cleanSession=false`, it keeps the durable subscription. Routes using a user-provided client are not affected by this change. Configuring Camel's `SupervisingRouteController` allows the framework to keep retrying with exponential backoff until the broker recovers: ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
