Since we're on a major migration process of this website, some component documents here are out of sync right now. In the meantime you may want to look at the early version of the new website
https://camel.apache.org/staging/
We would very much like to receive any feedback on the new site, please join the discussion on the Camel user mailing list.
Delay InterceptorAvailable in Camel 1.5 The Delay interceptor is an route interceptor that is used for slowing processing of messages down. This allows you to enable this interceptor and set a fixed amount of delay between each step a message passes in the route path, to show how things is happening nice and slowly, so you are not bombarded with a zillion lines of logging output. The delay interceptor can be configured as follows:
Configuring using SpringJust set the delay attribute of the camelContext tag as shown below: <camelContext id="camel" delayer="500" xmlns="http://activemq.apache.org/camel/schema/spring"> <route> <from uri="direct:start"/> <to uri="mock:result"/> </route> </camelContext> Configuring using JavaYou can add the delayer interceptor in the RouteBulder as shown below: public void configure() throws Exception { // add the delay interceptor to delay each step 200 millis getContext().addInterceptStrategy(new Delayer(200)); ... // regular routes here } In Camel 2.0 its a bit easier as you can just do getContext().setDelayer(200); GranularityIn Camel 2.0 you can configure it on both camel context and per route as you like. Per route will override the camel context setting. <camelContext ...> <route delayer="200"> ... </route> <route> ... </route> </camelContext> See Also |