Hi, > I would as you describe use the claimcheck
Pontus answer is a fair solution. A bit of elaboration from my side. First of all I must mention however that I would strongly prefer to create POJO-based memento [1] instead of serializing the exchanges. In order to avoid the need to clean up expired entries from the persistent store, you could also consider using our Cache component [2] instead of the persistence. EHCache will take care of the expired exchanges. Also if you're routing solution will be under a lot of stress, the message persistence may become a performance bottleneck. As far as I remember you can also disable exchange persistence in EHCache entirely. This will speed the persistence up. And if you're interested in something really scalable, consider using in-memory cache with conjunction with the lightweight multicast notifications handled via the JGroups component [3] (multicast notifications will be used to share common in-memory state). Google Guava comes with extremely useful in-memory cache implementation [4] which can safely evict the expired exchanges (and event notify you when such event occurs). Unfortunately at this point of time we don't provide Guava Cache for Camel out-of-the-box - I plan to contribute it until the end of 2013 :) . In the meantime you could use Guava Cache with custom POJO bean component to wrap Guava Cache. Best regards. [1] http://en.wikipedia.org/wiki/Memento_pattern [2] http://camel.apache.org/cache.html [3] http://camel.apache.org/jgroups.html [4] http://code.google.com/p/guava-libraries/wiki/CachesExplained -- Henryk Konsek http://henryk-konsek.blogspot.com
