Master Route Policy for multiple routes?

2019-02-18 Thread Dennis Holunder
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


httpj:engine-factory setting in JAVADSL way

2019-02-18 Thread Wang Yan
My CXF Endpoint Provider need to using https.
I found setting like below should work, but i did not found how to do it in
JAVADSL
because my route is JAVADSL

Any hints are more than welcome!