RoutePolicyPage edited by Ashwin KarpeChanges (1)
Full ContentRoutePolicyAvailable as of Camel 2.1 A route policy org.apache.camel.spi.RoutePolicy is used to control route(s) at runtime. For example you can use it to determine whether a route should be running or not. However the policies is can support any kind of use cases. How it worksYou associate a route with a given RoutePolicy and then during runtime Camel will invoke callbacks on this policy where you can implement your custom logic. Camel provides a support class that is a good base class to extend org.apache.camel.impl.RoutePolicySupport. There are these callbacks invoked
See the javadoc of the org.apache.camel.spi.RoutePolicy for more details. Camel provides the following policies out of the box:
As of Camel 2.5, Camel also provides an ability to schedule routes to be activated, de-activated, suspended and/or resumed at certain times during the day using a ScheduledRoutePolicy (offered via the camel-quartz component).
ThrottlingInflightRoutePolicyThe ThrottlingInflightRoutePolicy is triggered when an Exchange is complete, which means that it requires at least one Exchange to be complete before it works. The throttling inflight route policy has the following options:
ScheduledRoutePolicy (Simple and Cron based) using camel QuartzFor more details check out the following links
Configuring policyYou configure the route policy as follows from Java DSL, using the routePolicy method: RoutePolicy myPolicy = new MyRoutePolicy(); from("seda:foo").routePolicy(myPolicy).to("mock:result");
Change Notification Preferences
View Online
|
View Changes
|
Add Comment
|
- [CONF] Apache Camel > RoutePolicy confluence
- [CONF] Apache Camel > RoutePolicy confluence
- [CONF] Apache Camel > RoutePolicy confluence
- [CONF] Apache Camel > RoutePolicy confluence
- [CONF] Apache Camel > RoutePolicy confluence
- [CONF] Apache Camel > RoutePolicy confluence
- [CONF] Apache Camel > RoutePolicy confluence