You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2009/12/20 11:34:04 UTC

[NEW] Camel 2.2 - Graceful Shutdown - Feedback welcome

Hi

I am posting this to the user forum of Camel to a broader audience.

I have just added Graceful Shutdown to Camel 2.2 (trunk code will be
committed shortly).
https://issues.apache.org/activemq/browse/CAMEL-1483

The wiki page is here
http://cwiki.apache.org/confluence/display/CAMEL/Graceful+Shutdown

I have enabled it by default on trunk, which means the shutdown
process is altered.
You can read all about it on the wiki page.

As its new code I would love feedback and having people giving it a
test run on your systems.

There is one note, the SEDA/VM components uses an internal in memory
queue with pending exchanges to be processed.
The graceful shutdown will take this into account and wait until all
those pending messages have been run to completion.
The progress is logged at INFO level such as shown on the wiki page.

If there are other Camel components which have the same behavior,
please let me know, as I could not remember any other that did.
If so we need to let its consumer implements the ShutdownAware
interface which ensures the graceful shutdown can work with it.

I have set a default timeout of 300 seconds for the hole shutdown
process. During this time any pending and inflight exchanges should be
run to completion.
Camel will of course stop input consumers before hand which ensures no
new messages come into Camel. And therefore its just a matter of
waiting until
all those existing messages runs to completion. If you think this
timeout should have a different default value, then speak up.
What happens if the timeout is hit, then Camel will do a shutdown now,
where it forces all routes to shutdown and shutdown the remainder
services.
This ensures that Camel will not block forever during shutdown.


I have one questions although
======================

We have a batch consumer concept which allows a consumer to batch up a
number of exchanges to be routed.
For example: file, ftp, mail, jpa and others implement this.

The current gracful shutdown behavior is to stop during this batch.
What happens is that lets say there are 23 messages in the batch and
it has completed 7 of those.
Then a shutdown is issued. The batch consumer will complete its
current inprogress, and therefore it has completed 8. There are still
15 left in the batch. What happens
is that it will break and not complete the batch.

Do you think we should offer a configuration which allows the batch
consumers to control their behavior to
- stop as now during a batch
- continue to complete the batch before shutting down




-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [NEW] Camel 2.2 - Graceful Shutdown - Feedback welcome

Posted by Claus Ibsen <cl...@gmail.com>.
On Tue, Dec 22, 2009 at 12:17 PM, Claus Ibsen <cl...@gmail.com> wrote:
> Hi
>
> I have improved the graceful shutdown a bit more.
>
> It now honors SuspendableService to suspend the consumer at first,
> this allows for a more gentle shutdown.
> After all the pending + in flight messages is completed then those
> consumers is shutdown for real.
>
> I will ponder a bit about the, shutdown policy configuration for the
> route. There could be siutations where you want a rout to continue to
> run during graceful shutdown, in case its some internal route that
> others depends upon. Then marking it as "deferred" would solve this.
> Then it will only be shutdown when all pending and inflight messages
> has been completed.
>

Okay got the last pieces of the puzzle resolved. You can now configure
the routes to honor batch consumers dictating whether to let it
complete all the messages in the batch group or stop after the current
message.

You can checkout the details at the wiki page (need a couple of hours to sync)
http://camel.apache.org/graceful-shutdown.html

The last pieces was the configuration of the batch consumers. Now you
can decide whether it should stop after the current message has been
processed (default) or let it run through the entire batch group
before stopping. (configure using the ShutdownRunningTask option).


Graceful shutdown is enabled by default and most often you do not have
to worry or configure anything.

However you may want to defer certain _internal_ routes which other
routes is dependent upon.
For example if you use request/reply over such routes.

Any feedback is of course welcome. And please give it a try if you
have the chance and time.

I also wrote a blog entry about it
http://davsclaus.blogspot.com/2009/12/x-mas-present-to-apache-camel-graceful.html

>
>
> On Sun, Dec 20, 2009 at 5:41 PM, Ashwin Karpe <as...@progress.com> wrote:
>>
>> Hi Claus,
>>
>> The ability to associate a user controlled graceful shutdown strategy is
>> very good and certainly very valuable.
>>
>> +1 for this nice feature.
>>
>> As for the question on batching consumers, it would be great to have a
>> flag(shutdownPolicy) that specifies which way a user would like the endpoint
>> to behave in the event of context shutdown. Ideally this could be an
>> operation on the Batch Consumer interface which could be implemented by all
>> implementing endpoints and influenced based on a URI query setting on all
>> endpoints implementing Batch Consumer.
>>
>> Just a thought....
>>
>> Cheers,
>>
>> Ashwin...
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> I am posting this to the user forum of Camel to a broader audience.
>>>
>>> I have just added Graceful Shutdown to Camel 2.2 (trunk code will be
>>> committed shortly).
>>> https://issues.apache.org/activemq/browse/CAMEL-1483
>>>
>>> The wiki page is here
>>> http://cwiki.apache.org/confluence/display/CAMEL/Graceful+Shutdown
>>>
>>> I have enabled it by default on trunk, which means the shutdown
>>> process is altered.
>>> You can read all about it on the wiki page.
>>>
>>> As its new code I would love feedback and having people giving it a
>>> test run on your systems.
>>>
>>> There is one note, the SEDA/VM components uses an internal in memory
>>> queue with pending exchanges to be processed.
>>> The graceful shutdown will take this into account and wait until all
>>> those pending messages have been run to completion.
>>> The progress is logged at INFO level such as shown on the wiki page.
>>>
>>> If there are other Camel components which have the same behavior,
>>> please let me know, as I could not remember any other that did.
>>> If so we need to let its consumer implements the ShutdownAware
>>> interface which ensures the graceful shutdown can work with it.
>>>
>>> I have set a default timeout of 300 seconds for the hole shutdown
>>> process. During this time any pending and inflight exchanges should be
>>> run to completion.
>>> Camel will of course stop input consumers before hand which ensures no
>>> new messages come into Camel. And therefore its just a matter of
>>> waiting until
>>> all those existing messages runs to completion. If you think this
>>> timeout should have a different default value, then speak up.
>>> What happens if the timeout is hit, then Camel will do a shutdown now,
>>> where it forces all routes to shutdown and shutdown the remainder
>>> services.
>>> This ensures that Camel will not block forever during shutdown.
>>>
>>>
>>> I have one questions although
>>> ======================
>>>
>>> We have a batch consumer concept which allows a consumer to batch up a
>>> number of exchanges to be routed.
>>> For example: file, ftp, mail, jpa and others implement this.
>>>
>>> The current gracful shutdown behavior is to stop during this batch.
>>> What happens is that lets say there are 23 messages in the batch and
>>> it has completed 7 of those.
>>> Then a shutdown is issued. The batch consumer will complete its
>>> current inprogress, and therefore it has completed 8. There are still
>>> 15 left in the batch. What happens
>>> is that it will break and not complete the batch.
>>>
>>> Do you think we should offer a configuration which allows the batch
>>> consumers to control their behavior to
>>> - stop as now during a batch
>>> - continue to complete the batch before shutting down
>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>>
>> -----
>> ---
>> Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence
>> Progress Software Corporation
>> 14 Oak Park Drive
>> Bedford, MA 01730
>> ---
>> +1-972-304-9084 (Office)
>> +1-972-971-1700 (Mobile)
>> ----
>> Blog: http://opensourceknowledge.blogspot.com/
>>
>>
>> --
>> View this message in context: http://old.nabble.com/-NEW--Camel-2.2---Graceful-Shutdown---Feedback-welcome-tp26862323p26865006.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>>
>
>
>
> --
> Claus Ibsen
> Apache Camel Committer
>
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [NEW] Camel 2.2 - Graceful Shutdown - Feedback welcome

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I have improved the graceful shutdown a bit more.

It now honors SuspendableService to suspend the consumer at first,
this allows for a more gentle shutdown.
After all the pending + in flight messages is completed then those
consumers is shutdown for real.

I will ponder a bit about the, shutdown policy configuration for the
route. There could be siutations where you want a rout to continue to
run during graceful shutdown, in case its some internal route that
others depends upon. Then marking it as "deferred" would solve this.
Then it will only be shutdown when all pending and inflight messages
has been completed.



On Sun, Dec 20, 2009 at 5:41 PM, Ashwin Karpe <as...@progress.com> wrote:
>
> Hi Claus,
>
> The ability to associate a user controlled graceful shutdown strategy is
> very good and certainly very valuable.
>
> +1 for this nice feature.
>
> As for the question on batching consumers, it would be great to have a
> flag(shutdownPolicy) that specifies which way a user would like the endpoint
> to behave in the event of context shutdown. Ideally this could be an
> operation on the Batch Consumer interface which could be implemented by all
> implementing endpoints and influenced based on a URI query setting on all
> endpoints implementing Batch Consumer.
>
> Just a thought....
>
> Cheers,
>
> Ashwin...
>
>
> Claus Ibsen-2 wrote:
>>
>> Hi
>>
>> I am posting this to the user forum of Camel to a broader audience.
>>
>> I have just added Graceful Shutdown to Camel 2.2 (trunk code will be
>> committed shortly).
>> https://issues.apache.org/activemq/browse/CAMEL-1483
>>
>> The wiki page is here
>> http://cwiki.apache.org/confluence/display/CAMEL/Graceful+Shutdown
>>
>> I have enabled it by default on trunk, which means the shutdown
>> process is altered.
>> You can read all about it on the wiki page.
>>
>> As its new code I would love feedback and having people giving it a
>> test run on your systems.
>>
>> There is one note, the SEDA/VM components uses an internal in memory
>> queue with pending exchanges to be processed.
>> The graceful shutdown will take this into account and wait until all
>> those pending messages have been run to completion.
>> The progress is logged at INFO level such as shown on the wiki page.
>>
>> If there are other Camel components which have the same behavior,
>> please let me know, as I could not remember any other that did.
>> If so we need to let its consumer implements the ShutdownAware
>> interface which ensures the graceful shutdown can work with it.
>>
>> I have set a default timeout of 300 seconds for the hole shutdown
>> process. During this time any pending and inflight exchanges should be
>> run to completion.
>> Camel will of course stop input consumers before hand which ensures no
>> new messages come into Camel. And therefore its just a matter of
>> waiting until
>> all those existing messages runs to completion. If you think this
>> timeout should have a different default value, then speak up.
>> What happens if the timeout is hit, then Camel will do a shutdown now,
>> where it forces all routes to shutdown and shutdown the remainder
>> services.
>> This ensures that Camel will not block forever during shutdown.
>>
>>
>> I have one questions although
>> ======================
>>
>> We have a batch consumer concept which allows a consumer to batch up a
>> number of exchanges to be routed.
>> For example: file, ftp, mail, jpa and others implement this.
>>
>> The current gracful shutdown behavior is to stop during this batch.
>> What happens is that lets say there are 23 messages in the batch and
>> it has completed 7 of those.
>> Then a shutdown is issued. The batch consumer will complete its
>> current inprogress, and therefore it has completed 8. There are still
>> 15 left in the batch. What happens
>> is that it will break and not complete the batch.
>>
>> Do you think we should offer a configuration which allows the batch
>> consumers to control their behavior to
>> - stop as now during a batch
>> - continue to complete the batch before shutting down
>>
>>
>>
>>
>> --
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
>
>
> -----
> ---
> Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence
> Progress Software Corporation
> 14 Oak Park Drive
> Bedford, MA 01730
> ---
> +1-972-304-9084 (Office)
> +1-972-971-1700 (Mobile)
> ----
> Blog: http://opensourceknowledge.blogspot.com/
>
>
> --
> View this message in context: http://old.nabble.com/-NEW--Camel-2.2---Graceful-Shutdown---Feedback-welcome-tp26862323p26865006.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [NEW] Camel 2.2 - Graceful Shutdown - Feedback welcome

Posted by Claus Ibsen <cl...@gmail.com>.
On Mon, Dec 21, 2009 at 2:51 AM, Willem Jiang <wi...@gmail.com> wrote:
> Hi,
>
> I just have another question.
> Does the batching consumer support the transaction?
> If so we need to consider to add some option like to rollback the completed
> transactions or just let them be.
>

Its only a few components which supports "real" transactions such as
JDBC and JMS based.
And its Spring TX that does the work behind the scenes.

The batch consumers, just have the batch name as they work on a batch
of input messages, such as X files, X emails etc.
And then go over these X files one by one. Each "one" is a isolated
Exchange and thus not transacted in a big batch.
So there are no problem stopping in the middle of this. Just that
sometimes I may be "nicer" to complete this batch before shutting
down.

Suppose its a job that runs once a day, and there are like 5 files
left to go over, then it may be nice if it could give it time to work
those 5 files before shutting down.

And the Aggregator EIP does in fact have a *batchConsumer* option
which allows it to expect the "number of messages from the batch" so
if you use this option and shutdown, then the Aggregator will not be
able to complete.

Since its a graceful shutdown then I do think it would be nice and
fair to let Camel complete those batches. However its only if those
batches have a significant number of pending messages it could take
long time. Suppose a file consumer is picking up files once a day and
there are 10000 files to process :). A better example may be some
process that download big big FTP files and there are plenty of those
files.

We could also consider adding some VETO to shutting down in case all
inflight and pending messages cannot be done in due time. But that
does not go well with OSGi if you stop a camel bundle. Then you cannot
VETO this in OSGi as well. The only remedy is to give it more time to
complete all those messages.

Okay that may be going to far. Lets keep the first installment of
graceful shutdown simple :)



> Willem
>
> Ashwin Karpe wrote:
>>
>> Hi Claus,
>>
>> The ability to associate a user controlled graceful shutdown strategy is
>> very good and certainly very valuable.
>>  +1 for this nice feature.
>>
>> As for the question on batching consumers, it would be great to have a
>> flag(shutdownPolicy) that specifies which way a user would like the
>> endpoint
>> to behave in the event of context shutdown. Ideally this could be an
>> operation on the Batch Consumer interface which could be implemented by
>> all
>> implementing endpoints and influenced based on a URI query setting on all
>> endpoints implementing Batch Consumer.
>> Just a thought....
>>
>> Cheers,
>>
>> Ashwin...
>>
>>
>> Claus Ibsen-2 wrote:
>>>
>>> Hi
>>>
>>> I am posting this to the user forum of Camel to a broader audience.
>>>
>>> I have just added Graceful Shutdown to Camel 2.2 (trunk code will be
>>> committed shortly).
>>> https://issues.apache.org/activemq/browse/CAMEL-1483
>>>
>>> The wiki page is here
>>> http://cwiki.apache.org/confluence/display/CAMEL/Graceful+Shutdown
>>>
>>> I have enabled it by default on trunk, which means the shutdown
>>> process is altered.
>>> You can read all about it on the wiki page.
>>>
>>> As its new code I would love feedback and having people giving it a
>>> test run on your systems.
>>>
>>> There is one note, the SEDA/VM components uses an internal in memory
>>> queue with pending exchanges to be processed.
>>> The graceful shutdown will take this into account and wait until all
>>> those pending messages have been run to completion.
>>> The progress is logged at INFO level such as shown on the wiki page.
>>>
>>> If there are other Camel components which have the same behavior,
>>> please let me know, as I could not remember any other that did.
>>> If so we need to let its consumer implements the ShutdownAware
>>> interface which ensures the graceful shutdown can work with it.
>>>
>>> I have set a default timeout of 300 seconds for the hole shutdown
>>> process. During this time any pending and inflight exchanges should be
>>> run to completion.
>>> Camel will of course stop input consumers before hand which ensures no
>>> new messages come into Camel. And therefore its just a matter of
>>> waiting until
>>> all those existing messages runs to completion. If you think this
>>> timeout should have a different default value, then speak up.
>>> What happens if the timeout is hit, then Camel will do a shutdown now,
>>> where it forces all routes to shutdown and shutdown the remainder
>>> services.
>>> This ensures that Camel will not block forever during shutdown.
>>>
>>>
>>> I have one questions although
>>> ======================
>>>
>>> We have a batch consumer concept which allows a consumer to batch up a
>>> number of exchanges to be routed.
>>> For example: file, ftp, mail, jpa and others implement this.
>>>
>>> The current gracful shutdown behavior is to stop during this batch.
>>> What happens is that lets say there are 23 messages in the batch and
>>> it has completed 7 of those.
>>> Then a shutdown is issued. The batch consumer will complete its
>>> current inprogress, and therefore it has completed 8. There are still
>>> 15 left in the batch. What happens
>>> is that it will break and not complete the batch.
>>>
>>> Do you think we should offer a configuration which allows the batch
>>> consumers to control their behavior to
>>> - stop as now during a batch
>>> - continue to complete the batch before shutting down
>>>
>>>
>>>
>>>
>>> --
>>> Claus Ibsen
>>> Apache Camel Committer
>>>
>>> Author of Camel in Action: http://www.manning.com/ibsen/
>>> Open Source Integration: http://fusesource.com
>>> Blog: http://davsclaus.blogspot.com/
>>> Twitter: http://twitter.com/davsclaus
>>>
>>>
>>
>>
>> -----
>> --- Ashwin Karpe, Principal Consultant, PS - Opensource Center of
>> Competence Progress Software Corporation
>> 14 Oak Park Drive
>> Bedford, MA 01730
>> --- +1-972-304-9084 (Office) +1-972-971-1700 (Mobile) ---- Blog:
>> http://opensourceknowledge.blogspot.com/
>>
>>
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: [NEW] Camel 2.2 - Graceful Shutdown - Feedback welcome

Posted by Willem Jiang <wi...@gmail.com>.
Hi,

I just have another question.
Does the batching consumer support the transaction?
If so we need to consider to add some option like to rollback the 
completed transactions or just let them be.

Willem

Ashwin Karpe wrote:
> Hi Claus,
> 
> The ability to associate a user controlled graceful shutdown strategy is
> very good and certainly very valuable.
>  
> +1 for this nice feature.
> 
> As for the question on batching consumers, it would be great to have a
> flag(shutdownPolicy) that specifies which way a user would like the endpoint
> to behave in the event of context shutdown. Ideally this could be an
> operation on the Batch Consumer interface which could be implemented by all
> implementing endpoints and influenced based on a URI query setting on all
> endpoints implementing Batch Consumer. 
> 
> Just a thought....
> 
> Cheers,
> 
> Ashwin...
> 
> 
> Claus Ibsen-2 wrote:
>> Hi
>>
>> I am posting this to the user forum of Camel to a broader audience.
>>
>> I have just added Graceful Shutdown to Camel 2.2 (trunk code will be
>> committed shortly).
>> https://issues.apache.org/activemq/browse/CAMEL-1483
>>
>> The wiki page is here
>> http://cwiki.apache.org/confluence/display/CAMEL/Graceful+Shutdown
>>
>> I have enabled it by default on trunk, which means the shutdown
>> process is altered.
>> You can read all about it on the wiki page.
>>
>> As its new code I would love feedback and having people giving it a
>> test run on your systems.
>>
>> There is one note, the SEDA/VM components uses an internal in memory
>> queue with pending exchanges to be processed.
>> The graceful shutdown will take this into account and wait until all
>> those pending messages have been run to completion.
>> The progress is logged at INFO level such as shown on the wiki page.
>>
>> If there are other Camel components which have the same behavior,
>> please let me know, as I could not remember any other that did.
>> If so we need to let its consumer implements the ShutdownAware
>> interface which ensures the graceful shutdown can work with it.
>>
>> I have set a default timeout of 300 seconds for the hole shutdown
>> process. During this time any pending and inflight exchanges should be
>> run to completion.
>> Camel will of course stop input consumers before hand which ensures no
>> new messages come into Camel. And therefore its just a matter of
>> waiting until
>> all those existing messages runs to completion. If you think this
>> timeout should have a different default value, then speak up.
>> What happens if the timeout is hit, then Camel will do a shutdown now,
>> where it forces all routes to shutdown and shutdown the remainder
>> services.
>> This ensures that Camel will not block forever during shutdown.
>>
>>
>> I have one questions although
>> ======================
>>
>> We have a batch consumer concept which allows a consumer to batch up a
>> number of exchanges to be routed.
>> For example: file, ftp, mail, jpa and others implement this.
>>
>> The current gracful shutdown behavior is to stop during this batch.
>> What happens is that lets say there are 23 messages in the batch and
>> it has completed 7 of those.
>> Then a shutdown is issued. The batch consumer will complete its
>> current inprogress, and therefore it has completed 8. There are still
>> 15 left in the batch. What happens
>> is that it will break and not complete the batch.
>>
>> Do you think we should offer a configuration which allows the batch
>> consumers to control their behavior to
>> - stop as now during a batch
>> - continue to complete the batch before shutting down
>>
>>
>>
>>
>> -- 
>> Claus Ibsen
>> Apache Camel Committer
>>
>> Author of Camel in Action: http://www.manning.com/ibsen/
>> Open Source Integration: http://fusesource.com
>> Blog: http://davsclaus.blogspot.com/
>> Twitter: http://twitter.com/davsclaus
>>
>>
> 
> 
> -----
> --- 
> Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
> Progress Software Corporation
> 14 Oak Park Drive
> Bedford, MA 01730
> --- 
> +1-972-304-9084 (Office) 
> +1-972-971-1700 (Mobile) 
> ---- 
> Blog: http://opensourceknowledge.blogspot.com/
> 
> 


Re: [NEW] Camel 2.2 - Graceful Shutdown - Feedback welcome

Posted by Ashwin Karpe <as...@progress.com>.
Hi Claus,

The ability to associate a user controlled graceful shutdown strategy is
very good and certainly very valuable.
 
+1 for this nice feature.

As for the question on batching consumers, it would be great to have a
flag(shutdownPolicy) that specifies which way a user would like the endpoint
to behave in the event of context shutdown. Ideally this could be an
operation on the Batch Consumer interface which could be implemented by all
implementing endpoints and influenced based on a URI query setting on all
endpoints implementing Batch Consumer. 

Just a thought....

Cheers,

Ashwin...


Claus Ibsen-2 wrote:
> 
> Hi
> 
> I am posting this to the user forum of Camel to a broader audience.
> 
> I have just added Graceful Shutdown to Camel 2.2 (trunk code will be
> committed shortly).
> https://issues.apache.org/activemq/browse/CAMEL-1483
> 
> The wiki page is here
> http://cwiki.apache.org/confluence/display/CAMEL/Graceful+Shutdown
> 
> I have enabled it by default on trunk, which means the shutdown
> process is altered.
> You can read all about it on the wiki page.
> 
> As its new code I would love feedback and having people giving it a
> test run on your systems.
> 
> There is one note, the SEDA/VM components uses an internal in memory
> queue with pending exchanges to be processed.
> The graceful shutdown will take this into account and wait until all
> those pending messages have been run to completion.
> The progress is logged at INFO level such as shown on the wiki page.
> 
> If there are other Camel components which have the same behavior,
> please let me know, as I could not remember any other that did.
> If so we need to let its consumer implements the ShutdownAware
> interface which ensures the graceful shutdown can work with it.
> 
> I have set a default timeout of 300 seconds for the hole shutdown
> process. During this time any pending and inflight exchanges should be
> run to completion.
> Camel will of course stop input consumers before hand which ensures no
> new messages come into Camel. And therefore its just a matter of
> waiting until
> all those existing messages runs to completion. If you think this
> timeout should have a different default value, then speak up.
> What happens if the timeout is hit, then Camel will do a shutdown now,
> where it forces all routes to shutdown and shutdown the remainder
> services.
> This ensures that Camel will not block forever during shutdown.
> 
> 
> I have one questions although
> ======================
> 
> We have a batch consumer concept which allows a consumer to batch up a
> number of exchanges to be routed.
> For example: file, ftp, mail, jpa and others implement this.
> 
> The current gracful shutdown behavior is to stop during this batch.
> What happens is that lets say there are 23 messages in the batch and
> it has completed 7 of those.
> Then a shutdown is issued. The batch consumer will complete its
> current inprogress, and therefore it has completed 8. There are still
> 15 left in the batch. What happens
> is that it will break and not complete the batch.
> 
> Do you think we should offer a configuration which allows the batch
> consumers to control their behavior to
> - stop as now during a batch
> - continue to complete the batch before shutting down
> 
> 
> 
> 
> -- 
> Claus Ibsen
> Apache Camel Committer
> 
> Author of Camel in Action: http://www.manning.com/ibsen/
> Open Source Integration: http://fusesource.com
> Blog: http://davsclaus.blogspot.com/
> Twitter: http://twitter.com/davsclaus
> 
> 


-----
--- 
Ashwin Karpe, Principal Consultant, PS - Opensource Center of Competence 
Progress Software Corporation
14 Oak Park Drive
Bedford, MA 01730
--- 
+1-972-304-9084 (Office) 
+1-972-971-1700 (Mobile) 
---- 
Blog: http://opensourceknowledge.blogspot.com/


-- 
View this message in context: http://old.nabble.com/-NEW--Camel-2.2---Graceful-Shutdown---Feedback-welcome-tp26862323p26865006.html
Sent from the Camel - Users mailing list archive at Nabble.com.