camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject interceptors - something is terrible wrong
Date Sun, 13 Apr 2008 08:19:48 GMT


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


On the wiki:

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



Skovsgårdsvænget 21

8362 Hørning

Tlf. +45 2962 7576



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message