Oh if you use the endpoint approach instead of route policy then it
should be possible
https://github.com/apache/camel/blob/master/components/camel-zookeeper-master/src/main/docs/zookeeper-master-component.adoc#example

On Thu, Feb 21, 2019 at 9:08 AM Claus Ibsen <claus.ib...@gmail.com> wrote:
>
> Hi Dan
>
> Ah yeah that is currently not supported in camel-zookeeper-master. You
> are welcome to log a JIRA ticket.
>
> On Mon, Feb 18, 2019 at 10:30 AM Dennis Holunder <dennish...@gmail.com> wrote:
> >
> > Hi all,
> >
> > is it possible to use one master route policy to control master
> > selection for multiple routes inside one application? I need two
> > routes to be active but only if the application is on the master node
> >
> > MasterRoutePolicy policy = new MasterRoutePolicy();
> >
> > from("quartz2://r1?cron=0+0+15+?+*+*").routePolicy(policy).log("r1 doing 
> > work")
> > from("timer://r2?period=120s").routePolicy(policy).log("r2 doing work")
> >
> > Doing it like that starts only the first consumer after leader selection.
> >
> > If I instantiate 2 separate MasterRoutePolicy objects then two routes
> > compete on being master and also in that case only one route is
> > starting consumer.
> >
> > Dan
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to