Re: count of processed messages when using aggregation

2013-11-14 Thread Olaf
There is also onComplete() but it is triggered right after aggregator processed last message, not after the route has completed the last message. Isn't it a bug? Anyway it wouldn't have the counter in question, I'd only know route has finished @Override public void configure() throws Ex

Re: count of processed messages when using aggregation

2013-11-13 Thread cristisor
That's the beauty of the stream resequencer, it allows the messages to go one by one as they get ordered and the difference in speed is very little for the overall process. The batch aggregator waits for all the exchanges to completed and then it send them to the aggregator, which will bring additi

Re: count of processed messages when using aggregation

2013-11-13 Thread Olaf
I'll try that. However, it will probably make the overall process slower, because the aggregator must wait until all splitted messages are processed. Anyway, thanks for help! -- View this message in context: http://camel.465427.n5.nabble.com/count-of-processed-messages-when-using-aggregation-tp

Re: count of processed messages when using aggregation

2013-11-13 Thread cristisor
This problem can be solved by a stream resequencer. (http://camel.apache.org/resequencer.html - stream resequencing) It will reorder the exchanges after being processed and send them to the aggregator. You have to reorder them so that the exchange with the split complete is always the last one, and

Re: count of processed messages when using aggregation

2013-11-13 Thread Olaf
Suppose I have 102 lines and first 100 lines need processing time more than 1 second. Then last 2 lines arrive .to("remote") as first aggregated chunk and the exchange has CamelSplitComplete property set, which is misleading in this case, because 100 lines are not processed yet completely. I cannot

Re: count of processed messages when using aggregation

2013-11-13 Thread cristisor
You could set a count header on each exchange which leaves ".bean("myProcessor", "doWork")" and in the end log the number of the last exchange or have the ".bean("myProcessor", "doWork")" increase an internal counter and when you receive CamelSplitComplete you go into the myProcessor bean again and

Re: count of processed messages when using aggregation

2013-11-13 Thread Olaf
Hello, I still didn't find a solution. Somehow, I need to now, when all of aggregated portions have been completed. .aggregate(constant("id"), new Aggregator()).completionSize(100).completionTimeout(1).to("remote") and after that I could log, that the file is completed. Ideally I'd use .g

Re: count of processed messages when using aggregation

2013-11-05 Thread Taariq Levack
Aggregator has a CamelAggregatedSize, maybe try Simple[1] to set a header with the sum. [1] http://camel.apache.org/simple.html > On 05 Nov 2013, at 15:48, Olaf wrote: > > Hello, > > thanks! CamelSplitSize is useful. I'd add then > >.to("remote") >.choice() >

Re: count of processed messages when using aggregation

2013-11-05 Thread Olaf
Hello, thanks! CamelSplitSize is useful. I'd add then .to("remote") .choice() .when(property("CamelSplitComplete").isEqualTo("true")) .log("splitted ${property.CamelSplitSize} records") .otherwise()

Re: count of processed messages when using aggregation

2013-11-05 Thread Taariq Levack
Hi I think your split size is actually , try use the header from the split, CamelSplitSize. Taariq On Tue, Nov 5, 2013 at 1:57 PM, Olaf wrote: > Hello, > > is there an easy way to count and sum all processed lines by an aggregator? > Suppose, my file has lines, the route split it int