Gert V. is the export on this matter. I will try to get his attention.
/Claus Ibsen
Apache Camel Committer
Blog: http://davsclaus.blogspot.com/
On Tue, Nov 18, 2008 at 4:35 PM, Char <[EMAIL PROTECTED]> wrote:
>
> Hi camel rider-community!
>
> I have a question referring the usage of StreamCachingInterceptor.
>
> My route-config (simplified):
>
>
> from("jbi:endpoint:http://biz.accelsis.swm/InboundRoutingService/EDIFileInEndpoint")
> .intercept(new StreamCachingInterceptor())
> .process(new DataProcessor(new SyntaxCheckProcessor(),
> DataProcessor.BODY_TO_BODY))
> .multicast()
> .to("direct:ctrl", "direct:main");
>
> from("direct:ctrl")
> .intercept(new StreamCachingInterceptor())
> .process(new DataProcessor(new
> ExtractionProcessor("/envelope/control/data"))
> .to("jbi:endpoint:http://biz.accelsis.swm/FileOutService/ContrlOut");
>
> from("direct:main")
> .to("jbi:endpoint:http://biz.accelsis.swm/FileOutService/SapOut");
>
> I believe that i need the StreamCachingInterceptor because i send a message
> containing a stream-body via multicast to two endpoints. My tests show that
> if the first one (direct:ctrl) reads the message, the stream is used and can
> not be read again by endpoint two (direct:main). But somehow, i tried
> multiple tests with the StreamCachingInterceptor, but none of them is
> working.
>
> - Where do i have to insert ".intercept(new StreamCachingInterceptor())" ?
>
> - How do i have to extract the body in the following Processor? The current
> code is like this:
> ByteArrayInputStream is =
> messageIn.getBody(StreamSource.class).getInputStream();
> Does that work?
>
> I already tried a global "streamCaching()" and more local
> from(...).streamCaching().to... alternatives, but i feel that i am missing
> something.
>
> Please help me. Thanks in advance.
>
> --
> View this message in context:
> http://www.nabble.com/StreamCachingInterceptor-question-tp20561886s22882p20561886.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>