camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xlogger <>
Subject RoutePolicySupport - Difference between onStart and doStart
Date Wed, 15 Jun 2016 01:19:32 GMT
I would like to have a Camel Route deploying on multiple servers/docker
containers to run in active-standby mode. After some studies, I'm targeting
to apply RoutePolicy that leverage "leader election" solutions like etcd and

Checked the Camel source code in Github and found that there are
and ConsulRoutePolicy
available in the latest branch. However, I'm a bit confused on the

If I understand correctly, both of the route policies requires the
definition of serviceName/servicePath during initialization, and acquire
lock using those 2 attributes during route "doStart". However, it seems more
make sense to me to override onStart, in which it has the route object as
the argument, thus I could acquire lock using the route-id...

Would like to understand if there is any reason those 2 routepolicies
leverage doStart instead of onStart? what is the difference between these 2
events in a route lifecycle?

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message