shashank created CAMEL-26869:
--------------------------------
Summary: camel-cluster - a ClusteredRouteController stopped while
the CamelContext runs stops the cluster service it shares with others
Key: CAMEL-26869
URL: https://issues.apache.org/jira/browse/CAMEL-26869
Project: Camel
Issue Type: Bug
Components: camel-core
Reporter: shashank
Assignee: shashank
When a {{ClusteredRouteController}} is stopped or shut down while the
CamelContext keeps running, {{doStop}} stops its cluster service. By default
the route controller looks up the cluster service of the CamelContext
({{ClusterServiceHelper.mandatoryLookupService}}), which other users share: a
route controller that replaces it ({{setRouteController}} does not stop the old
one, so the old one is shut down by hand), the cluster route policies and the
master consumers of the CamelContext. Stopping it makes all of them give up
their leadership, and nothing starts the cluster service again until the
CamelContext restarts.
Expected: a route controller stopped while the CamelContext runs stops only a
cluster service it started itself and that is not a service of the
CamelContext. When the CamelContext stops, the cluster service is stopped as
now, once the routes have stopped (CAMEL-26756).
Found in the review of CAMEL-26756 (apache/camel#29531), from reading the code;
confirmed with a test (two route controllers sharing the cluster service of the
CamelContext, the old one shut down).
_Filed with Claude Code on behalf of allthingssecurity._
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)