Gert Do you mind documenting how it can be configured in Spring XML also?
And please add a link to it from [Dead Letter Channel], in see also and maybe a little {tip:} On Thu, Mar 12, 2009 at 10:21 PM, <conflue...@apache.org> wrote: > Page Created : CAMEL : Stream caching > > Stream caching has been created by Gert Vanthienen (Mar 12, 2009). > > Content: > > Stream caching > > While stream types (like StreamSource, InputStream and Reader) are commonly > used in messaging for performance reasons, they also have an important > drawback: they can only be read once. In order to be able to work with > message content multiple times, the stream needs to be cached. > > By default, streams are caching in memory. In Camel 2.0, large stream > messages (over 64 Kb) will be cached in a temporary file instead – Camel > itself will handle deleting the temporary file once the cached stream is no > longer necessary. > > Using stream caching > > Implicitly enabled for multicast and dead letter channel > > Some EIPs require that the message content can be read multiple times. > Stream caching will be automatically enabled when using these EIPs in your > routes: > > Multicast will implicitly cache streams to ensure that all the endpoints can > access the message content > Dead Letter Channel uses stream caching to ensure that the message content > can actually be read again when redelivering a message > > Explicitly configure stream caching > > In Apache Camel, you can explicitly enable stream caching in a route with > the streamCaching DSL method: > > from("direct:a").streamCaching().to("mock:a"); > > You can also enable it for all the routes in routebuilder: > > streamCaching(); > from("direct:b").to("mock:b"); > > How it works? > > In order to determine if a type requires caching, we leverage the type > converter feature. Any type that requires stream caching can be converted > into an org.apache.camel.StreamCache instance. > > Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - > Bug/feature request > > Unsubscribe or edit your notifications preferences -- Claus Ibsen Apache Camel Committer Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/