Hi

 

Sorry for the title but I needed to get your attention.

 

On the wiki: http://activemq.apache.org/camel/dsl.html

The interceptor sample is a good old logging sample that looks plausible and 
easy to understand. If you add intercept("log:mylogger") then Camel would log 
all the transitions.

 

But the terrible part is that the logging example does not work as stated. In 
Camel if the interceptor kicks in it "swallows" the exchange and the exchange 
is not routed further.

 

I have added a unit test to the came-core: 
org.apache.camel.issues.InterceptorLogTest that demonstrates the problem.

 

If you enable the intercept() codeline the unit test fails.

 

What is the fundamental usage for interceptors in Camel?

The use case from an end user was to log all the steps so he could get an idea 
how the exchanges was actually routed - a great feature in my mind.

 

 

I have created a ticket CAMEL-442 to improve the documentation for 
interceptors. I think the interceptor concept should be on its own page, so its 
easier to find in the current documentation.

 

 

 

 

Med venlig hilsen

 

Claus Ibsen

......................................

Silverbullet

Skovsgårdsvænget 21

8362 Hørning

Tlf. +45 2962 7576

Web: www.silverbullet.dk

 

Reply via email to