Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-11897

camel-kubernetes: cannot use the same cluster view to start a master route and a custom service

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.20.1
    • None
    • None
    • Unknown

    Description

      Using the camel-master on a route like:

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

      And a custom service like:

      clusterService.getView("mylock").addEventListener((CamelClusterEventListener.Leadership) (view, leader) -> {
        LOG.info("The leader is {}", leader);
      });
      

      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

      Attachments

        Issue Links

          Activity

            People

              nferraro Nicola Ferraro
              nferraro Nicola Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: