Show Table of Contents
39.2. Stream Caching
In Apache Camel, different stream types like StreamSource, InputStream and Reader are commonly used in messaging for performance reasons and can be read only once. From Apache Camel 2.16 release, you can explicitly enable stream caching by invoking the
StreamCaching() DSL method:
from("jbi:service:http://foo.bar.org/MyService")
.streamCaching()
.to("jbi:service:http://foo.bar.org/MyOtherService");
In Spring XML, you can set the attribute streamCache= 'true' on the route tag.
<route streamCache="true"> <from uri="jbi:service:http://foo.bar.org/MyService"/> <to uri="jbi:service:http://foo.bar.org/MyOtherService"/> </route>

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.