camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <>
Subject Re: Single instance of running route in the cluster
Date Sat, 13 Oct 2012 08:32:19 GMT
On Wed, Oct 10, 2012 at 3:26 PM, Zhemzhitsky Sergey
<> wrote:
> Hello guys,
> What is the best way to have a single instance of running route in the cluster (multiple
instances of the same route deployed on the different containers)?
> The example of such a requirement is a ftp/smpp access with a limited number of connections.
So only one instance of route is allowed to run at any single point of time.
> Currently there is ZooKeeperRoutePolicy that seems to fit these requirements, but it
seems to lock the routes only when an exchange is already started, i.e. ftp connection has
been established (look at onExchangeBegin here,%20org.apache.camel.Exchange%29)

That code ought to be triggered on the onInit callback, then the
leader election can be run prior to routes starting up.
If not then feel free to log a JIRA and as usual we love
contributions, so patches is welcome.

> Also for this issues Hazelcast with its distributed locks can be used.
> So what is the best way to have the backup routes and only single running route among
the multiple similar routes?
> Does camel have a standard solution for such issues?

Zookeeper is good but it requires to run zookeeper instances. There is
also quartz which has a logic for this.

And then there is Fuse Fabric which has this baked in as well.

> Best Regards,
> Sergey
> _______________________________________________________
> CONFIDENTIALITY NOTICE: This email and any files attached to it may be conf idential.
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.

Claus Ibsen
Red Hat, Inc.
FuseSource is now part of Red Hat
Twitter: davsclaus
Author of Camel in Action:

View raw message