CronScheduledRoutePolicyPage edited by Richard Kettelerij
Comment:
changed version number due to https://issues.apache.org/jira/browse/CAMEL-6789
Changes (1)
Full ContentCronScheduledRoutePolicyAvailable as of Camel version 2.6 CronScheduledRoutePolicy is a ScheduledRoutePolicy that facilitates route activation, de-activation, suspension and resumption of routes based on a Quartz CronTrigger. Maven users will need to add a camel-quartz dependency to their pom.xml to avail this capability.
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-quartz</artifactId>
<version>x.x.x</version>
<!-- use the same version as your Camel core version -->
</dependency>
Once the org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy is created it can be wired into the camel route as follows Configuring the policy
CronScheduledRoutePolicy startPolicy = new CronScheduledRoutePolicy();
startPolicy.setRouteStartTime("*/3 * * * * ?");
from("direct:start")
.routeId("testRoute").routePolicy(startPolicy).noAutoStartup()
.to("mock:success");;
<bean id="startPolicy" class="org.apache.camel.routepolicy.quartz.CronScheduledRoutePolicy">
<property name="routeStartTime" value="*/3 * * * * ?"/>
</bean>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<route id="testRoute" routePolicyRef="startPolicy" autoStartup="false">
<from uri="direct:start"/>
<to uri="mock:success"/>
</route>
</camelContext>
See AlsoScheduledRoutePolicy - for information on policy based scheduling capability for camel routes
Stop watching space
|
Change email notification preferences
View Online
|
View Changes
|
[CONF] Apache Camel > CronScheduledRoutePolicy
Richard Kettelerij (Confluence) Fri, 11 Oct 2013 06:11:36 -0700
- [CONF] Apache Camel > CronScheduledRout... Babak Vahdat (Confluence)
- [CONF] Apache Camel > CronSchedule... Richard Kettelerij (Confluence)
- [CONF] Apache Camel > CronSchedule... Carsten Ringe (Confluence)
