Hello, I did a small review of the RoutePolicy we have for having one route master and one slave and all have an issue as they are invoked after the route is started so the consumer may have the time to consume some data before the policy kicks in [1].
There is now a zookeeper-master component and some work is in in progress [2] in such area so wondering if we should deprecate such policies once [2] is done with or without fixing them. If we decide to fix them we could make the route to not auto start on policy initialization so then the policy could take care to start/stop the routes it is supposed to manage, an example of such behaviour can be see in my experimental branch [3] and in CuratorLeaderPolicy [4]. Thoughts ? [1] https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/impl/RouteService.java#L213-L232 [2] https://issues.apache.org/jira/browse/CAMEL-10320 [3] https://github.com/lburgazzoli/apache-camel/blob/route-policy/components/camel-infinispan/src/main/java/org/apache/camel/component/infinispan/policy/InfinispanRoutePolicy.java [4] https://github.com/apache/camel/blob/master/components/camel-zookeeper/src/main/java/org/apache/camel/component/zookeeper/policy/CuratorLeaderRoutePolicy.java --- Luca Burgazzoli