camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hadrian Zbarcea <>
Subject Re: Should we (could we?) make Exchanges serializable?
Date Fri, 08 Oct 2010 13:51:45 GMT
fwiw, Hadrian

On Oct 8, 2010, at 7:05 AM, Claus Ibsen wrote:

> On Fri, Oct 8, 2010 at 12:21 PM, Ade <> wrote:
>> I've never been a fan of Java serialization; however, I've been working with
>> a Camel user who wants to be able to serialize an exchange and place the
>> whole thing on a JMS queue. The motivation is that they want to set the
>> exchange up to be subsequently persisted in a database for audit purposes,
>> but they want to separate the writing to a queue (relatively fast and
>> asynchronous) from the act of persisting to a database.
>> In order to achieve this, they've had to create their own serializable
>> versions of Exchange, Header, Property, Message and Attachments. This works,
>> but it's painful to have to write and maintain that extra code.
>> So. Just curious: would it be possible to modify the Camel core API and make
>> Exchanges etc. serializable? Interested to hear people's thoughts on this.
> I dont think we should do this. We can not assume the data it contains
> can be serialized.
> There is a DefaultExchangeHolder class which you can use to serialize
> and Exchange. It has the features to only transfer the objects which
> can be serialized.
> Its used by other components which supports the transferExchange
> options such as camel-jms, camel-mina, camel-netty, camel-hawtdb etc.
>> --
>> View this message in context:
>> Sent from the Camel - Users mailing list archive at
> -- 
> Claus Ibsen
> Apache Camel Committer
> Author of Camel in Action:
> Open Source Integration:
> Blog:
> Twitter:

View raw message