Re: Old Exchange always returns null

2017-03-27 Thread Claus Ibsen
If you want all files to be aggregated together then use a constant expression. Read more about the eip pattern and how it works http://camel.apache.org/aggregator2.html Its concept is also detailed in the EIP book. And other books like Camel in Action and Camel Cookbook have much more details as

Re: Old Exchange always returns null

2017-03-27 Thread Ambika Das
If I use the following from("direct:items") .aggregate(header(*"id"*), myAggregationStrategy) .completionTimeout(500) .to("direct:send-to-A"); I am getting invalid correlation id error. Regards, Prasad On Mon, Mar 27, 2017 at 2:42 PM, Claus Ibsen wrote: > Your use the file nam

Re: Old Exchange always returns null

2017-03-27 Thread Claus Ibsen
Your use the file name as aggregrate expression and therefore its grouping per file name and so file a.txt and b.txt do not group together. And you get aggregate with old exchange as null when a new group is started On Mon, Mar 27, 2017 at 10:49 AM, Ambika Das wrote: > Hi, > > I am aggregating c

Old Exchange always returns null

2017-03-27 Thread Ambika Das
Hi, I am aggregating contents of a csv file. the csv file can contain rows with same e mail id. For those lines I need to generate a combined JSON with contents aggregated. I am using PreCompletionAwareAggregationStrategy and my aggregate method looks like this. if (oldExchange == null) { re