camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olaf <>
Subject count of processed messages when using aggregation
Date Tue, 05 Nov 2013 11:57:41 GMT

is there an easy way to count and sum all processed lines by an aggregator?
Suppose, my file has 9999 lines, the route split it into 100 lines chunks
and send them to a remote system. The goal is, to gather statistics of all
sent lines. In the example below, .log() would always print the aggregation
size (100 or less) and not the number of overall processed messages, which
should be 9999

    public void configure() throws Exception {
                .bean("myProcessor", "doWork")
                .aggregate(constant("id"), new
                .log("Sent ${header.RecordsCounter} records to remote");

Thanks in advance!

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

View raw message