camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Converting message body after GroupedExchangeAggregationStrategy
Date Fri, 20 Jan 2012 15:13:14 GMT
On Fri, Jan 20, 2012 at 4:09 PM, suman <prashanth.shivakumar@gmail.com> wrote:
> I tried this but no luck...In my receipient list,the list of recipients are a
> comma separated HTTP URLs..
> So what iam trying to do is make a parallel request to bunch of HTTP urls
> and than try to process them in the
> processor(eventStreamedAggregationProcessor).Inside that processor, i
> retrieve list of exchanges but the body in each of them are of type
> org.apache.camel.converter.stream.CachedOutputStream$WrappedInputStream.
> And sometimes i can see that the stream is closed as well.
>
>

Ah implement your own AggregationStrategy, instead of the
GroupedExchangeAggregationStrategy, and get the body as a String and
store the bodies.

String body = newExchange.getIn().getBody(String.class);





> from("direct:getlivestreaminfo").startupOrder(2).convertBodyTo(String.class)
>                .recipientList().method(messageRouter,
> "routeTo").parallelProcessing().aggregationStrategy(new
> GroupedExchangeAggregationStrategy())
>                .process(eventStreamedAggregationProcessor).to("log:foo");
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Converting-message-body-after-GroupedExchangeAggregationStrategy-tp5158191p5160681.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message