davsclaus commented on code in PR #30919:
URL: https://github.com/apache/camel/pull/30919#discussion_r4716691373


##########
core/camel-cluster/src/main/java/org/apache/camel/impl/cluster/ClusteredRoutePolicy.java:
##########
@@ -272,6 +276,18 @@ public void onRemove(Route route) {
         stoppedRoutes.remove(route);
     }
 
+    @Override
+    public void onStart(Route route) {

Review Comment:
   Done in 24a10c473cff: added the Javadoc on `onStart`.
   
   _Claude Code on behalf of Claus Ibsen_



##########
core/camel-cluster/src/main/java/org/apache/camel/impl/cluster/ClusteredRoutePolicy.java:
##########
@@ -309,6 +327,25 @@ private void removeCamelEventListeners() {
         }
     }
 
+    private void restart() {
+        LOG.debug("ClusteredRoutePolicy for namespace {} is used again after 
it was shut down", namespace);
+        // a change queued when the executor was shut down was dropped, and 
the CamelContext starts again
+        leadershipChangePending.set(false);
+        reapply.set(false);
+        retryScheduled.set(false);
+        contextStarted.set(false);
+        contextResumed = false;
+        initialDelayElapsed = false;
+        // the routes are created while the CamelContext initializes: start 
them once it has started
+        startManagedRoutesEarly = true;
+        camelContext.getManagementStrategy().addEventNotifier(listener);

Review Comment:
   Done in 24a10c473cff: `restart()` now calls `failedStarts.clear()`.
   
   _Claude Code on behalf of Claus Ibsen_



-- 
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]

Reply via email to