You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Nicola Ferraro (JIRA)" <ji...@apache.org> on 2017/11/11 11:43:00 UTC

[jira] [Closed] (CAMEL-11897) camel-kubernetes: cannot use the same cluster view to start a master route and a custom service

     [ https://issues.apache.org/jira/browse/CAMEL-11897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nicola Ferraro closed CAMEL-11897.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 2.20.1

> 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
>             Fix For: 2.20.1
>
>
> 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)