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
consul. 

Checked the Camel source code in Github and found that there are
EtcdRoutePolicy(https://github.com/apache/camel/blob/master/components/camel-etcd/src/main/java/org/apache/camel/component/etcd/policy/EtcdRoutePolicy.java)
and ConsulRoutePolicy
(https://github.com/apache/camel/tree/master/components/camel-consul/src/main/java/org/apache/camel/component/consul/policy)
available in the latest branch. However, I'm a bit confused on the
implementation...

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: 
http://camel.465427.n5.nabble.com/RoutePolicySupport-Difference-between-onStart-and-doStart-tp5784061.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to