On Wed, Oct 10, 2012 at 3:26 PM, Zhemzhitsky Sergey
<sergey_zhemzhit...@sberbank-cib.ru> 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 
> http://camel.apache.org/maven/camel-2.9.0/camel-zookeeper/apidocs/org/apache/camel/component/zookeeper/policy/ZooKeeperRoutePolicy.html#onExchangeBegin%28org.apache.camel.Route,%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.
http://fabric.fusesource.org/


> 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
Email: cib...@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Reply via email to