camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject RE: Explanation requested for when intercept defined outside of the route ?
Date Thu, 10 Jul 2008 10:27:49 GMT

We have a JIRA ticket for a separate page for the interceptor. Currently there is only a little
sniff at the DSL page

Ad 1)
Yes one of the things I would like to improve is to make it easier for end users to add their
own with this method. However you can use the existing DSL to route to a bean and there you
can do what you want with the exchange.

This method is for adding interceptors that is more tightly coupled with Camel where you can
do more advanced stuff, hence some of the tracer and JMX stuff is added like this.

Ad 2 + 3)
If you add intercept() outside a route it's a global intercepter for all the rouutes. 

On the other hand if you add it within a route it's only for this route.

Med venlig hilsen
Claus Ibsen
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576

-----Original Message-----
From: cmoulliard [] 
Sent: 10. juli 2008 12:16
Subject: Explanation requested for when intercept defined outside of the route ?


I see in the tests case of Camel that they are at least three different ways
to use the interceptor :

1) Add tracer as an interceptor (using the context)


where InterceptStrategy can be :
- Debugger : to debug and trace
- Tracer : to trace routes
- Instrumentation : for monitoring performance metrics

Remark : It should be interesting to have test case to see How to implement
InstrumentationInterceptStrategy ?

2) intercept is embedded in the routing

e.g.  from("seda:bar").intercept().to("log:hoho")

3) intercept is defined outside of the route




Questions :

- What is the difference between case 2) and 3) if there is one ?
- What will be intercepted in the case 3)  ?



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

View raw message