You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bwest <bw...@gmail.com> on 2016/12/11 16:46:41 UTC

Singleton Route running in Cluster for Messaging Consumer w/ Quartz and RoutePolicies

Greetings, 

I'm trying to have a singleton cluster configuration with only one messaging
consumer route running in the cluster (if it matters it's a rabbitmq
consumer).  

I've configured Quartz and am using the clustered features, which seems to
only work for having only one concurrent execution.  

Also to note:  I've looked at using both the SimpleScheduledRoutePolicy and
CronRoutePolicy.  The issue I'm seeing there is I'm not seeing a way to set
the quartz endpoint parameters for quartz.  (stateful=true, JobName,
GroupName etc...).  

Am I doing something wrong here?  I apologize, as I'm a bit new to both
camel and quartz.  Below is the route code to outline what i'm trying to do: 


    SimpleScheduledRoutePolicy policy = new SimpleScheduledRoutePolicy();
    long startTime = System.currentTimeMillis() + 3000L;
    policy.setRouteStartDate(new Date(startTime));
    policy.setRouteStartRepeatCount(-1);
    policy.setRouteStartRepeatInterval(10000);

   
from({consumer.endpoint}}").noAutoStartup().routePolicy(policy).to("log:example?showBody=true&multiline=false");    





--
View this message in context: http://camel.465427.n5.nabble.com/Singleton-Route-running-in-Cluster-for-Messaging-Consumer-w-Quartz-and-RoutePolicies-tp5791354.html
Sent from the Camel - Users mailing list archive at Nabble.com.