You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by rouble <r....@gmail.com> on 2013/03/21 17:23:40 UTC

Stream Caching 101

Camel-o-philes,

Can someone give me a quick understanding of what it means if I enable
stream caching? Does it mean that in a single processor I can read the
IN or OUT message as many times as I like? It does not seem to be this
way. I can easily recreate a situation if I try to read a message the
second time in the same processor, I get an empty string (not null,
empty). Am I missing something?

For my use case, of pretty printing the body when it enters a
processor, and when it leaves the same processor I need to be able to
read the message multiple times in the same processor. For this I am
having to re-set it back after every read - which sort of kills the
purpose of enabling stream caching - but maybe this is not how it was
intended to be used?

tia,
rouble

Re: Stream Caching 101

Posted by Christian Müller <ch...@gmail.com>.
We documented this feature here: http://camel.apache.org/stream-caching.html

Best,
Christian

On Thu, Mar 21, 2013 at 5:23 PM, rouble <r....@gmail.com> wrote:

> Camel-o-philes,
>
> Can someone give me a quick understanding of what it means if I enable
> stream caching? Does it mean that in a single processor I can read the
> IN or OUT message as many times as I like? It does not seem to be this
> way. I can easily recreate a situation if I try to read a message the
> second time in the same processor, I get an empty string (not null,
> empty). Am I missing something?
>
> For my use case, of pretty printing the body when it enters a
> processor, and when it leaves the same processor I need to be able to
> read the message multiple times in the same processor. For this I am
> having to re-set it back after every read - which sort of kills the
> purpose of enabling stream caching - but maybe this is not how it was
> intended to be used?
>
> tia,
> rouble
>



--