You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by James Green <ja...@gmail.com> on 2016/02/24 16:09:49 UTC

Multiple interceptors?

http://camel.apache.org/intercept.html does not describe the behaviour of
having more than one interceptor in use.

For example:

intercept().to("log:foo");
intercept().to("log:bar");

from("direct:start").to("direct:end");

Do both logging endpoints get triggered? If so, in any particular order?

Is it even allowed?

Our use case is where we intercept a recipient list endpoint that may be
queue or http. We clearly need to marshal to json first for which we have
an interceptor. But for a queue we also need to set In/Out to wait for the
reply. My thoughts are another interceptor, this time for queues only.

Thanks,

James