Nicola Ferraro created CAMEL-11897:
--------------------------------------

             Summary: camel-kubernetes: cannot use the same cluster view to 
start a master route and a custom service
                 Key: CAMEL-11897
                 URL: https://issues.apache.org/jira/browse/CAMEL-11897
             Project: Camel
          Issue Type: Bug
            Reporter: Nicola Ferraro
            Assignee: Nicola Ferraro


Using the camel-master on a route like:

{code}
from("master:mylock:timer:clock")
  .log("Hello World!");
{code}

And a custom service like:
{code}
clusterService.getView("mylock").addEventListener((CamelClusterEventListener.Leadership)
 (view, leader) -> {
  LOG.info("The leader is {}", leader);
});
{code}

produces an incorrect result as the route is not started, while the log is 
printed on the pod that becomes leader.

If I use a master route like "master:lock1:timer:clock" and use the view 
"lock2" in the custom service, everything works as expected.

Example here: https://github.com/nicolaferraro/camel-leader-election



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to