camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From owain <>
Subject Re: Restoring body from header holding MyPojo works differently in test (with mock) than production
Date Tue, 30 May 2017 07:43:15 GMT
Thanks Claus.

So the general rule appears to be  that do not rely on the class of headers
as the components may manipulate them.  So it looks as though MockEndpoint
leaves them alone whereas the enrich route changes the type from pojo to

Quoting from the book:  

"Properties—Similar to message headers, but they last for the duration of
the entire exchange. Properties are used to contain global-level
information, whereas message headers are specific to a particular message.
Camel itself will add various properties to the exchange during routing.
You, as a developer, can store and retrieve properties at any point during
the lifetime of an exchange."

So a simple change to the route to this works a treat.



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message