Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.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
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
In Spring XML, you can set the attribute
Copy to Clipboard
Copied!
Toggle word wrap
Toggle overflow
StreamCaching()
DSL method:
from("jbi:service:http://foo.bar.org/MyService") .streamCaching() .to("jbi:service:http://foo.bar.org/MyOtherService");
from("jbi:service:http://foo.bar.org/MyService")
.streamCaching()
.to("jbi:service:http://foo.bar.org/MyOtherService");
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>
<route streamCache="true">
<from uri="jbi:service:http://foo.bar.org/MyService"/>
<to uri="jbi:service:http://foo.bar.org/MyOtherService"/>
</route>