9 Replies Latest reply on Jun 8, 2009 7:51 AM by Claus Ibsen

    Confusion regarding Aggregator

    jamie archibald Apprentice

      I've been experimenting with the camel aggregator and I am trying to write a simple aggregator that batches a bunch of messages and sends the messages out every minute.


      So essentially I do NOT want the aggregator to depend on the batchSize or outBatchSize, only the batchTimeout property.


      <camel:aggregator strategyRef="myAggregator" batchTimeout="60000" batchSize="0">


         <camel:to uri="direct:myEndpoint"/>



      The problem I am having is that the aggregator only sends the batched messages when the time has reached 60seconds AND the number of meessages received is 100 (since batchSize=100 by default).


      I tried setting batchSize=0 and this does not ignore the batchSize property.


      How does one configure the aggregator to ignore batch sizes and only send out messages after a specified time?