You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bishap <bi...@gmail.com> on 2014/11/14 18:17:46 UTC

Route policy for clustered servicemix/camel based on hazelcast locks

Hello everyone,

I’m new to camel and I’m trying to develop a route policy that insures a
single instance execution of a route in a clustered servicemix /camel. The
policy will be used for endpoints that don’t manage concurrent access such
as IMAP.

For the policy I opted for a lock mechanism based on Hazelcast, but I’m not
sure when (in the route lifecycle) shall the lock occur and what part of the
route is the most suitable to stop (rout, endpoint, consumer). I tested
stopping the route and the consumer.

To sum up what i understood and my tests :

onInit() -> the route and the consumer aren’t started yet so the lock and
stop aren’t useful here. I also tried an autoStart=false, so that I can
start the route in the onInit() but that didn’t work.

onStart()-> the route/consumer are already started so maybe stopping them
here is not the most appropriate manner.

Do you have any advice on when shall the lock occur and on which part of the
route is the most appropriate to stop?

Thank you in advance,

-Bashar




--
View this message in context: http://camel.465427.n5.nabble.com/Route-policy-for-clustered-servicemix-camel-based-on-hazelcast-locks-tp5759149.html
Sent from the Camel - Users mailing list archive at Nabble.com.