camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Zhemzhitsky Sergey <>
Subject Hot Standby failover for Apache Camel routes
Date Thu, 06 Feb 2014 08:32:32 GMT
Hi Camel Gurus,

Could you please help me to understand how the hot standby failover policy described here
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

public void start() {
    try {"Route consumers: {}", 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) {"Route consumer: {}", 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,

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. 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message