We had the same problem and aggrgator (same applies to sequencer) will not work 
due to a potential timeout splitting the result as you described it allready. 
We solved it by
a) starting the route
b) do all processing / aggregation in combination with the inflight repository 
to detect the end of the process (no message left in the system)
c) shutdown the route

Be careful: if you keep the route up and running you need a marker to 
distinguish different data sets (when does the first ser finish and the next 
start). We decided to simply shutdown the route after completion (empty 
inflight repo)

Lets see what other methods may exist.

Jens



Von meinem iPhone gesendet

> Am 04.08.2015 um 14:49 schrieb BojanSM <b.nenado...@levi9.com>:
> 
> I have a situation, probably misusing aggregator component, where I need to
> aggregate certain (not known) number of messages and discard the rest. Since
> I don't know how many messages I have to aggregate I can not use
> completionSize to finish aggregation. On the other hand, if I put some
> completionTimeout, I am afraid that timeout will expire and new messages
> will come for aggregation. So, I would like to discard all new messages that
> satisfy correlation Expression.
> 
> 
> 
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Aggregator-discard-new-messages-tp5770276.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to