Hi Camel Gurus, Could you please help me to understand how the hot standby failover policy described here http://www.liquid-reality.de/display/liquid/2011/11/11/Hot+Standby+failover+for+Apache+Camel+routes should work? I was playing with the sample from the github, and it seems to behave pretty strange.
I’ve just added the logging into net.lr.simplecluster.example.FailoverRoutePolicy public void start() { try { LOG.info("Route consumers: {}", consumers); ServiceHelper.startServices(consumers); ServiceHelper.resumeServices(consumers); } catch (Exception e) { LOG.error(e.getMessage(), e); } } And here is what I can see in the logs: [LockManager] FailoverRoutePolicy INFO Route consumers: [null] [LockManager] FailoverRoutePolicy INFO Route consumers: [null] [LockManager] FailoverRoutePolicy INFO Route consumers: [null] So the policy is trying to start and stop no consumers at all Digging deeper I have added the logging into the onInit callback public void onInit(Route route) { LOG.info("Route consumer: {}", route.getConsumer()); consumers.add(route.getConsumer()); } And here is the log entry [apache.camel.spring.Main.main()] FailoverRoutePolicy INFO Route consumer: null Route’s consumer is null/not created yet and it seems that it’s not possible to obtain route’s consumer from its onInit callback. I’m just trying to understand whether it is an expected behavior or not. Kind Regards, Sergey _______________________________________________________ CONFIDENTIALITY NOTICE: This email and any files attached to it may be confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.