Hey Claus, AFAIK you need to add a proceed() at the end of an intercept() route or, as you described, it swallows the exchange. I found a little bug in the proceed() method as well... but this patch should fix it up. http://www.nabble.com/file/p16669908/intercept.patch intercept.patch
Cheers, Jon Claus Ibsen wrote: > > 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 > > > > > -- View this message in context: http://www.nabble.com/interceptors---something-is-terrible-wrong-tp16661322s22882p16669908.html Sent from the Camel - Development mailing list archive at Nabble.com.
