bacar, as suggested...use a completionTimeout value greater than 0...this
will complete when a max size of 100 is reached OR after no new messages are
received for that amount of time...whichever is FIRST...

also, if you have a max delay requirement, then use the completionInterval()
instead to guarantee completion periodically instead of the
completionTimeout which requires idle time in between messages to complete,
etc...


bacar wrote
> Hi,
> 
> Is there a way to aggregate the first 100 messages from a seda if >=100
> are
> available, but just take however many are available if there are fewer?
> 
> I think I want aggregate(...).completionSize(100).completionTimeout(0), ie
> complete on 100 items or 0, whichever condition is met "first", but I'm
> not
> convinced that this will actually do the right thing.
> 
> Is there a known correct solution for this?
> 
> Thanks
> Baris.





-----
Ben O'Day
IT Consultant -http://consulting-notes.com

--
View this message in context: 
http://camel.465427.n5.nabble.com/Aggregate-up-to-N-ASAP-tp5758134p5758147.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to