JinyuChen97 commented on code in PR #25767:
URL: https://github.com/apache/camel/pull/25767#discussion_r3871284100
##########
components/camel-paho-mqtt5/src/main/java/org/apache/camel/component/paho/mqtt5/PahoMqtt5Consumer.java:
##########
@@ -139,6 +141,23 @@ public void deliveryComplete(IMqttToken token) {
}
}
+ private void restartRouteAsync() {
+ Thread restartThread = new Thread(() -> {
+ try {
+ String routeId = getRoute().getRouteId();
+ LOG.info("Stopping route {} for restart after resubscribe
failure", routeId);
+
getEndpoint().getCamelContext().getRouteController().stopRoute(routeId);
Review Comment:
and also for the 'but is there a case for making it opt-in via an endpoint
option for operators who already run their own external supervision/restart
logic?', the previous log only behaviour was not a correct design choice right?
it was a bug that left the route in Started state while silently consuming
nothing. For user who already run their own external supervision/restart logic,
there should be no conflict AbstractCamelContext.startRoute() and stopRoute()
are both guarded by the same ReentrantLock, so concurrent stop/start calls from
our auto-restart and external supervision are serialized safely. Please correct
me if I'm wrong.
--
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]