camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Willem Jiang <>
Subject Re: Immutable object
Date Thu, 14 Oct 2010 09:06:45 GMT
On 10/14/10 4:39 PM, Muhammad Ichsan wrote:
> On Thu, Oct 14, 2010 at 3:23 PM, Willem Jiang<>  wrote:
>> st create a new copy of internalMessage in the modify method and set it to
>> the message body after the modification ?
> So, Camel will use the same instance across Camel routes?
> I failed to replace the message into getIn().setBody() with the
> message clone. It triggers time out exception. May be it's because I'm
> not quite understand about inOut trick. This situation forces me to
> have Camel call clone-service bean before getting into modification
> bean. And it works.

Deep copying will introduce the performance issue to camel, you have to 
do it yourself. Basically Camel will copy the message headers and 
message body and exchange properties from first exchange to a new next 
exchange when it passes the next exchange to another process.

Open Source Integration:
Blog: (English)

View raw message