Exchange Object Serialization in Camel

1.3k Views Asked by At

Can we make exchange object in camel as serializable ?

Let's say i want to cache the Exchange object as value in memcached, how to do that ? Memcached accepts values only if they are serializable objects !

TIA

1

There are 1 best solutions below

1
On

Exchange is not serializable because objects that we put in exchange may not be always serializable. End users of Camel can put any kind of non serializable data in it.

Read more @ http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/DefaultExchangeHolder.html

Do not put entire Exchange object in cache memory ,instead Try to put only required object or else take a look at DefaultExchangeHolder