Sorry, I have to correct myself it didn't start at all on all machines. So, still not working for me. In logs I see just
09:11:33 [main] INFO o.a.camel.impl.DefaultCamelContext - Skipping starting of route myId as its configured with autoStartup=false 09:11:33 [main] INFO o.a.camel.impl.DefaultCamelContext - Total 9 routes, of which 8 are started 09:11:33 [main] INFO o.a.camel.impl.DefaultCamelContext - Apache Camel 2.20.1 (CamelContext: camel-1) started in 0.348 seconds 2018-01-10 9:43 GMT+01:00 Dennis Holunder <dennish...@gmail.com>: > Tried. Leader selection with MasterRoutePolicy didn't work at all. All > instances started the route and no errors or any hints were reported > > MasterRoutePolicy master = new MasterRoutePolicy(); > master.setZooKeeperUrl("host1:2181,host2:2181"); > master.setZkRoot("/route/root"); > master.setGroupName("myGroup"); > > from("quartz:cron").noAutoStartup().routePolicy(master).log("done"); > > > 2018-01-09 16:51 GMT+01:00 Claus Ibsen-2 [via Camel] > <ml+s465427n5816565...@n5.nabble.com>: >> Yeah I think it does. Can you give it a try, and we can improve the docs. >> >> On Tue, Jan 9, 2018 at 4:47 PM, Dennis Holunder <[hidden email]> wrote: >> >>> thank you! >>> Does it support multiple zookeeper comma-separated URLs? The example >>> in docs uses just one localhost >>> >>> masterRoutePolicy.setZooKeeperUrl("host1:2181,host2:2181,host3:2181"); >>> >>> 2018-01-09 16:25 GMT+01:00 Claus Ibsen-2 [via Camel] >>> <[hidden email]>: >>>> Yes check its doc page >>>> >>>> https://github.com/apache/camel/blob/master/components/camel-zookeeper-master/src/main/docs/zookeeper-master-component.adoc >>>> >>>> And its also covered in the CiA2 book in the clustering chapter. >>>> >>>> On Tue, Jan 9, 2018 at 1:38 PM, Dennis Holunder <[hidden email]> wrote: >>>> >>>>> Is there any documentation or example usage of zookeeper-master >>>>> component? >>>>> >>>>> 2018-01-09 13:17 GMT+01:00 Claus Ibsen-2 [via Camel] >>>>> <[hidden email]>: >>>>>> Try the zookeeper-master component - it should be better >>>>>> >>>>>> On Tue, Jan 9, 2018 at 12:55 PM, Dennis Holunder <[hidden email]> >>>>>> wrote: >>>>>> >>>>>>> Hello, >>>>>>> >>>>>>> I'm using zookeeper route policy for leader selection on 8 instances >>>>>>> of my route and get sometimes 2 leaders selected. What I'm doing wrong >>>>>>> here? >>>>>>> >>>>>>> String uri = "zookeeper:srv1:2181,srv2:2181,srv3:2181/myapp/myroute"; >>>>>>> >>>>>>> ZooKeeperRoutePolicy policy = new ZooKeeperRoutePolicy(uri, 1); >>>>>>> policy.setShouldStopConsumer(false); >>>>>>> >>>>>>> from("cron").routePolicy(policy).log("started"); >>>>>>> >>>>>>> Denny >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Claus Ibsen >>>>>> ----------------- >>>>>> http://davsclaus.com @davsclaus >>>>>> Camel in Action 2: https://www.manning.com/ibsen2 >>>>>> >>>>>> >>>>>> ________________________________ >>>>>> If you reply to this email, your message will be added to the >>>>>> discussion >>>>>> below: >>>>>> >>>>>> >>>>>> http://camel.465427.n5.nabble.com/zookeeper-leader-selection-selects-multiple-leaders-tp5816553p5816554.html >>>>>> To unsubscribe from Camel, click here. >>>>>> NAML >>>> >>>> >>>> >>>> -- >>>> Claus Ibsen >>>> ----------------- >>>> http://davsclaus.com @davsclaus >>>> Camel in Action 2: https://www.manning.com/ibsen2 >>>> >>>> >>>> ________________________________ >>>> If you reply to this email, your message will be added to the discussion >>>> below: >>>> >>>> http://camel.465427.n5.nabble.com/zookeeper-leader-selection-selects-multiple-leaders-tp5816553p5816563.html >>>> To unsubscribe from Camel, click here. >>>> NAML >> >> >> >> -- >> Claus Ibsen >> ----------------- >> http://davsclaus.com @davsclaus >> Camel in Action 2: https://www.manning.com/ibsen2 >> >> >> ________________________________ >> If you reply to this email, your message will be added to the discussion >> below: >> http://camel.465427.n5.nabble.com/zookeeper-leader-selection-selects-multiple-leaders-tp5816553p5816565.html >> To unsubscribe from Camel, click here. >> NAML