Ah yeah that is only for add/remove.
For events like that you can use event notifier
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/ManagementStrategy.html
And it can listen for any of these events
You can register a custom lifecycle to get callbacks
http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/LifecycleStrategy.html
There is api on camel context to add it. or if you use spring then
just declare it as a and its auto enabled
On Tue, Oct 13, 2015 at 10:55
Hi,
I was wondering if it was possible to register something on a
CamelContext so that when a route deployed on it is started (using any
type of from()), some code is executed.
Optimally, it would be useful to know the component involved (if
possible the object, but even its string name
It's not clear from the Javadoc if it will give me ways to know when a
route start (not when it is added), but maybe I don't know well how
Camel works…
Could you clarify that for me? Thanks :)
Le 13/10/2015 11:02, Claus Ibsen a écrit :
You can register a custom lifecycle to get callbacks
I wasn't so clear: I really meant I wanted to be notified when a new
exchange is sent from a Consumer component.
So I guess what I am looking for is something like ExchangeSendingEvent
or ExchangeSentEvent :)
Thank you very much!
Victor
Le 13/10/2015 11:09, Claus Ibsen a écrit :
Ah yeah
Or maybe interceptor (in particular interceptFrom) are more adequate as
they allow me to only be notified when the from of a route is invoked?
Victor
Le 13/10/2015 11:13, Victor NOËL a écrit :
I wasn't so clear: I really meant I wanted to be notified when a new
exchange is sent from a