On Tue, May 10, 2011 at 8:03 PM, cmveal <cmv...@gmail.com> wrote:
> I've been trying to figure out how graceful shutdown works with aggregator
> and shutdownRunningTask="CompleteAllTasks".
>
> If I use a completionInterval="5000", would that mean that my messages
> successfully get processed given that shutdown takes longer than 5 seconds?
> Would shutdownRoute="Defer" help in this case?
>

The shutdown task option applies to in-flight messages. If a messages
arrives into the aggregator, it would not be regarded as in-flight
anymore.

The option may help you as the input route to the aggregator, may keep
running, and thus send in messages into the aggregator. Which then may
trigger completions, and cause those last messages to complete as
well.

The shutdown algorithm doesn't tap into the Aggregator and ask it how
many partly aggregated messages does it currently keep.
You can use the persistent support of the aggregator to ensure those
partly aggregated messages are stored safely.

> What would happen if I use completionSize=5 and I only have 4 messages?
> Would these messages get processed properly prior to shutdown?
>

No.

> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/Aggregator-with-shutdownRunningTask-tp4385211p4385211.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cib...@fusesource.com
Web: http://fusesource.com
CamelOne 2011: http://fusesource.com/camelone2011/
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Reply via email to