You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Stefan Meisner Larsen <st...@meisner-larsen.dk> on 2017/01/30 10:00:32 UTC
ZooKeeperPolicy not working in Camel 2.18.1 (?)
I would really appreciate if someone could help me get ZooKeeperRoutePolicy
working asexpected...
I have a zookeeper cluster with 3 servers and two karaf instances with the
following route installed:
from("timer://timer1?fixedRate=true&period=10000")
.routeId(routeId)
.routePolicy(new ZooKeeperRoutePolicy(zookeeperLock, 1))
.log(LoggingLevel.INFO, logger, "Hello, World");
The value of zookeeperLock is zookeeper:leto49.zook-dev.jppol.net:2181,
leto50.zook-dev.jppol.net:2181,
leto51.zook-dev.jppol.net:2181/servicebus/dk.jppol.sb.service.test.lock
Here is my test scenario:
Install route on server A
- I can see the log from server A
Install the route on server B
- The route fails on server B because it didn't get the lock
Now I stopped the karaf instance on A, expecting B to start writing "Hello,
World" in the log
- Nothing happens <====== WHY NOT?
Starting instance A again
- The route fails because A couldn't get the lock
When expecting the zookeeper cluster, all servers looks as expected, the
lock contains two entries with the one from B first in list
I was expecting server B to get the lock and start the route when instance
A was shutdown. Since A could not get the lock I know that B got it, and
this was verified by looking into zookeeper.
But the route in B was never started, which leads me to the conclusion,
that ZookeepeRoutePolicy is not working (as I expected it to...)
==================================================================================================
Cheers,
Stefan