You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by ROO <ra...@hotmail.com> on 2013/08/24 20:16:29 UTC

Two camel context

I have requirements where users create requests to be sent to list of
services for processing. Request parameters define the target service. These
services are also asynchronous. So I need to periodically call a results
service to check if results are ready. Then I can get it to continue my
flow.What I have done, is storing new requests created by users in a DB
table. To get the results I used camel to define a route that periodically
grab some of these requests, call results services and if they are ready the
route get them, parse data and apply the rest of the process.This approach
is working fine, but the problem is that one of our environment is using two
servers to balance the load. So I am going to have two camel routes doing
the same job. Is there any way to synchronize the work of these two routes
together so they don't override each other work?Thanks and appreciate your
help



--
View this message in context: http://camel.465427.n5.nabble.com/Two-camel-context-tp5737862.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Two camel context

Posted by Willem jiang <wi...@gmail.com>.
Hi,  

I think you may consider Zookeeper enabled route policy[1].

[1]http://camel.apache.org/zookeeper.html#Zookeeper-ZooKeeperenabledRoutepolicy.  

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Sunday, August 25, 2013 at 2:16 AM, ROO wrote:

> I have requirements where users create requests to be sent to list of
> services for processing. Request parameters define the target service. These
> services are also asynchronous. So I need to periodically call a results
> service to check if results are ready. Then I can get it to continue my
> flow.What I have done, is storing new requests created by users in a DB
> table. To get the results I used camel to define a route that periodically
> grab some of these requests, call results services and if they are ready the
> route get them, parse data and apply the rest of the process.This approach
> is working fine, but the problem is that one of our environment is using two
> servers to balance the load. So I am going to have two camel routes doing
> the same job. Is there any way to synchronize the work of these two routes
> together so they don't override each other work?Thanks and appreciate your
> help
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/Two-camel-context-tp5737862.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).