On Thu, Jan 19, 2012 at 5:30 PM, suman <[email protected]> wrote: > Hello All, > This is my route > from("direct:getstreaminfo").startupOrder(2) > .recipientList().method(MessageRouter.class, > "routeTo").parallelProcessing().aggregationStrategy(new > GroupedExchangeAggregationStrategy()).convertBodyTo(String.class) > .process(eventStreamedProcessor).to("log:foo"); > > Iam trying to get the list of exchanges in processor using > List<Exchange> exchangeList = > exchange.getProperty(Exchange.GROUPED_EXCHANGE, List.class); > But my problem is within each of the exchanges,the body is of type > CachedOutputStream.WrappedInputStream which i cant access. > So all i want is within each of the exchange present in the list,i want to > body to be of type String.Is it possible? >
Either convert the body to a String *before* sending to the aggregator. Or convert the body to a String after. I recommend to do it before as the stream may be closed on later access, if it takes too long time to access it afterwards. > Thanks > Suman > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Converting-message-body-after-GroupedExchangeAggregationStrategy-tp5158191p5158191.html > Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen ----------------- FuseSource Email: [email protected] Web: http://fusesource.com Twitter: davsclaus, fusenews Blog: http://davsclaus.blogspot.com/ Author of Camel in Action: http://www.manning.com/ibsen/
