camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Raul Kripalani <r...@evosent.com>
Subject Re: Interceptable Producer
Date Thu, 04 Oct 2012 20:14:51 GMT
Interceptors live inside the Camel Context, and if the ProducerTemplate is
bound to the same context and the interception pattern matches, it will
also kick in for exchanges sent from the PT.

Maybe you can set a condition using .when() so that only Exchanges *not
carrying a specific header* (e.g. 'FromProducerTemplate') are ultimately
intercepted.

Then you set this header on all Exchanges sent via the ProducerTemplate and
you're interceptor should ignore them.

Check out the second code example in the InterceptSendToEndpoint doc
section [1]. It shows how to use .when().

[1] http://camel.apache.org/intercept.html#Intercept-InterceptSendToEndpoint

Hope that helps,

*Raúl Kripalani*
Apache Camel Committer
Enterprise Architect, Program Manager, Open Source Integration specialist
http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani
http://blog.raulkr.net | twitter: @raulvk <http://twitter.com/raulvk>

On Thu, Oct 4, 2012 at 8:07 PM, Benjamin Graf <benjamin.graf@gmx.net> wrote:

> Hi everybody,
>
> I actually have a problem with a route using a producertemplate as a
> splitter to
> send several exchanges. Unfortunately the ProducerTemplate seems to to be
> interceptable by my written Interceptor. Does anybody know how I might
> workaround this?
>
> Thx
> Benjamin
>
>

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