camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Commented) (JIRA)" <>
Subject [jira] [Commented] (CAMEL-5008) Stream handling inconsistent.
Date Thu, 16 Feb 2012 05:42:59 GMT


Claus Ibsen commented on CAMEL-5008:

And in your case just do not use the streamCaching from Camel.
Then your message body is left untouched by Camel. 

> Stream handling inconsistent.
> -----------------------------
>                 Key: CAMEL-5008
>                 URL:
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 2.8.2
>         Environment: Mac OX 10.7
>            Reporter: Sebastian Rühl
>             Fix For: 2.10.0
>         Attachments:
> When working with streams, stream caching must be activated in order to use log:set trace,
otherwise the streams will be consumed, as stated here ("#Using
Streaming Bodies"). When the stream caching now gets activated, the streams will be reseted
after each step (as far as I Understand). This makes it impossible to work with InputStreams
in a pipe manner (e.g. Read the first char, then in the next step work with the next chars),
as the stream is after this every time in the beginning.
> I would except that the stream caching provides a mechanism for the "user" to be able
to read it more than once. Also its the right procedure to reset the streams after they are
traced with the tracing mechanism, BUT the should be reseted to the state they were before
and not to the very first beginning. I didn't dig into the code that deep but it seems that
exactly this happens from user perspective.
> So to summarize there are several problems:
> - Working in stream in camel is impossible when log:set debug trace get enabled. (Thus
enable Stream caching)
> - When Stream caching is enabled it becomes impossible to work with "stream pointers"
as camel reset the streams to the very beginning.
> I illustrated the problem in the attached jUnit test.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message