camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Add a Processor to a route at runtime
Date Wed, 23 Mar 2011 08:00:40 GMT
On 3/23/11 3:07 PM, JacobS wrote:
> I am adding plugins functionality to my app and I want the plugins to be able
> to add processors to the existing routes. I don't know in which route or
> where in the route the plugin would want to add some logic thats why I
> wanted to add the processors at runtime.

It's hard the find a right place to add your processor unless you tell 
camel exactly the place that you want to add the processor.
And the intercept is adding the processor when it loads routes, I don't 
think you can do it in the runtime unless you stop the route and start a 
new one for it.
> Can 'Camel Intercept' help me with this ?
> -Is it possible to add intercepts at run-time to a chosen location ?
Intercepts supports to add processors at the endpoint that match your 
requirement. And it also supports to do the intercepts which is based on 
the exchange.

> -How would it effect performance if I add intercepts to all routes before
> each processing step although I wont be needing added functionality to all
> of the processing steps?
That would be a problem, I don't suggest your add the intercepts into 
all the route. If you really need to do that, you may consider to stop 
the camel context and use some kind of option to decide if enable the 
intercepts or not.

> Thanks
> Jacob
> --
> View this message in context:
> Sent from the Camel - Users mailing list archive at

Blog: (English)
Twitter: willemjiang

View raw message