You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2009/03/25 11:29:42 UTC

[jira] Created: (CAMEL-1483) Graceful shutdown

Graceful shutdown
-----------------

                 Key: CAMEL-1483
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
             Project: Apache Camel
          Issue Type: New Feature
    Affects Versions: 1.6.0, 2.0.0
            Reporter: Claus Ibsen
             Fix For: 2.1.0


Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.

It allows the component to eg deny any new incoming messages.

Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.

James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1483:
-------------------------------

    Fix Version/s:     (was: 2.1.0)

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on CAMEL-1483 started by Claus Ibsen.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1483:
-------------------------------

    Component/s: camel-core

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50790#action_50790 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

[11:15]  <jstrachan> I guess for some things, its no biggie - e.g. stop all the JMS consumers and HTTP consumers first
[11:15]  <jstrachan> as sending to JMS endpoints is still fine even after the JMS consumers stop
[11:15]  <cibsen> yeah
[11:16]  <cibsen> file consumer as well
[11:16]  <jstrachan> i.e. stopping all incoming endpoints should be fine for real networked stuff (database, jms, http, mina etc)
[11:16]  <jstrachan> yeah
[11:16]  <jstrachan> its just in memory stuff like SEDA that its a tad tricky
[11:16]  <jstrachan> so maybe we only mark things like JMS, file, database, HTTP as GracefulShutdownAware (or whatever we call it)
[11:17]  <jstrachan> i.e. stuff that you can still send to after the consumer stops
[11:17]  <jstrachan> then ordering doesn't matter
[11:17]  <cibsen> yes good idea
[11:17]  <jstrachan> then we know we really can gracefully shut down all those puppies
[11:17]  <cibsen> and you should not have many messages in SEDA queus anyway as its in memory only and fast
[11:17]  <jstrachan> yeah
[11:18]  <jstrachan> once all the graceful stuff is shut down, we could maybe wait a bit for SEDA queues to empty up to some timeout or something
[11:18]  <cibsen> so we can just give it some time to settle down before stopping
[11:18]  <jstrachan> yeah
[11:18]  <jstrachan> not sure if MessageListenerContainer supports graceful shutdown, we'd have to check
[11:18]  <cibsen> we can use timeout for now and later support a stategy that monitors the queues and see if they are empty
[11:19]  <cibsen> that one is a beast to shutdown in correct ordering with AMQ, Spring and Camel

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>             Fix For: 2.1.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56601#action_56601 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

Should honor {{SuspendableService}} to suspend routes over shutdown before it waits for all the inflight exchanges to complete.
After all exchanges is complete then its shutdown for real afterwards.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56548#action_56548 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

trunk: 892595.

Is now JMX managed as well

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=54601#action_54601 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

We also have the inflight repository now that can inform how many messages are currently being routed.

This allows us to peek this value and wait shutting down until this value reaches zero.

There should be some form of timeout etc. to prevent deadlocking by waiting for that inflight to reach zero.

And Camel should offer a more range of shutdown operations
- shutdownNow
- shutdownGraceful
- shutdownGraceful(timeout)


> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>             Fix For: 2.1.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56608#action_56608 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

Improved a bit. Now it honors SuspendableService during graceful shutdown.

trunk: 893138.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56546#action_56546 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

trunk: 892587.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen reassigned CAMEL-1483:
----------------------------------

    Assignee: Claus Ibsen

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56542#action_56542 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

I got some basic graceful shutdown up and running. Looks good so far.

I am opting for to make graceful shutdown the default in Camel and have it failsafe with a timeout that can tackle if there should be a weird situation where there are inflight exchanges which seems to never complete.

It will of course be pluggable and configurable.

It works with pending messages on seda queues and it waits for inflight exchanges to be completed.
And it stops those routes which can safely be stopped so Camel wont intake new exchanges while other routes are still routing those remaining exchanges.

There will be an interface to use by other components to indicate that they are like the seda and have pending in memory messages that Camel should wait for as well.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56663#action_56663 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

trunk: 893963.

Added fine grained control for graceful shutdown (work in progress).



> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56545#action_56545 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

See more details at
http://old.nabble.com/-NEW--Camel-2.2---Graceful-Shutdown---Feedback-welcome-ts26862323.html

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-1483:
-------------------------------

    Fix Version/s: 2.2.0

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>             Fix For: 2.1.0, 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1483.
--------------------------------

    Resolution: Fixed

trunk: 893983.

Graceful shutdown now have fine grained control on batch consumers to whether to shutdown after current tasks or wait until the entire batch group has been completed.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>          Components: camel-core
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CAMEL-1483) Graceful shutdown

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1483?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56602#action_56602 ] 

Claus Ibsen commented on CAMEL-1483:
------------------------------------

It would be ideal if {{Consumer}} extends {{SuspendableService}} instead of {{Service}} which would allow for a better and less bumpy graceful shutdown. As its suspended it will just block any incoming messages but still keep the remainder of the routes running. This allows with breeze to run the inflight exchanges to completion. And after this we can safely shutdown for real.

> Graceful shutdown
> -----------------
>
>                 Key: CAMEL-1483
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1483
>             Project: Apache Camel
>          Issue Type: New Feature
>    Affects Versions: 1.6.0, 2.0.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>             Fix For: 2.2.0
>
>
> Introduce a GracefulShutdownAware interface (in lack of better name) that components can support.
> It allows the component to eg deny any new incoming messages.
> Can be used by JMS, File, Http, Mina etc. to better support graceful shutdown as they will deny new messages.
> James have a good idea on this one. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.