Hello,

If you need metadata or a value on multiple endpoints, or to be used
internally in your routes, it is better to put them in the
exchangeProperties. Then copy them out to headers, when needed. Since
headers are meant to be used at the protocol/component in/out, there
is no guarantee they persist or be unchanged when the message returns.
Also reduces unwanted metadata leaking out of your routes, for example
to JMS, HTTP/SOAP as you mentioned.



On Wed, Nov 25, 2015 at 12:52 AM, Matt Sicker <boa...@gmail.com> wrote:
> I filter out what headers to send when making REST calls through http4 for
> instance, so that's not an issue. When I make internal calls to networked
> services (e.g., Kafka, Hazelcast, or pretty much anything other than the
> message brokering components), I lose all my headers until the response
> message is handled (and only some components save those headers).
>
> On 24 November 2015 at 16:36, ychawla <premiergenerat...@gmail.com> wrote:
>
>> That sounds sensible to me.  The headers are for message and exchange
>> metadata.  Just be careful to not send them over the wire when you call an
>> external component.
>>
>>
>>
>> --
>> View this message in context:
>> http://camel.465427.n5.nabble.com/Am-I-using-headers-right-tp5774363p5774365.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>
>
>
> --
> Matt Sicker <boa...@gmail.com>



-- 
Kind regards
Joakim Bjørnstad

Reply via email to