camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boday <>
Subject Re: correlationExpression while Aggregating
Date Tue, 08 Nov 2011 18:24:22 GMT
Ebe, what does your bean return?  If its just a String, then just use the
completionSize() like this...

.aggregate(constant(true), new MyAggregationStrategy()).completionSize(2000)

If the bean returns a List of Strings, then you can split them, then
aggregate them based on your strategy

.to("bean:myBean")  //returns List<String>
.split(body())  //splits into String
.aggregate(constant(true), new MyAggregationStrategy()).completionSize(2000)   

see this page, for more details...

ebinsingh wrote:
> Hi All,
> Appreciate your help.
> I have a bean that returns a String or a StringBuilder. I want to
> aggregate the first 2000 String's returned by this method into a single
> file.
> I am having trouble with finding the right correlationExpression to
> aggregate them.
> Please can you help me fix this.
> Thanks & regards,
> Ebe

Ben O'Day
IT Consultant -

View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message