camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Müller <>
Subject Improving the Aggregator
Date Thu, 06 Dec 2012 22:56:19 GMT
It would be great to improve the Aggregator to support a completion size
which evaluates ALL exchanges (from all different aggregates).
We ofter have the requirement to split a file which contains items which we
process independently. At the end, we have to aggregate the items based on
the customer.

As an example, we have one input file with 1000 items which will result in
2 output files with 300 and 700 items (or 3 output files with 273, 493, 234
items - or 4 output files with ... I think you got it). At the end, the
aggregator will receive in total 1000 files which should be trigger a flush
on ALL existing aggregates.

What do you think?
Is there already a simple solution for this which I miss?

At present we use a combination of two aggregators to do this. Each will
receive a copy of an item. The second aggregator only counts the total
number of all received exchanges (we are using the same aggragation key
value for this aggregator). If this aggragor flushes the exchange, we send
a "command message" to the first aggregator to flush all the aggregates.

I think there should be a simpler solution out of the box which Camel
should offer. E.g. completionRepositorySize or repositoryCompletionSize


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message