camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CAMEL-7042) Graceful shutdown of RabbitMQConsumer requires channel.close()
Date Fri, 20 Dec 2013 18:10:11 GMT

     [ https://issues.apache.org/jira/browse/CAMEL-7042?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Claus Ibsen resolved CAMEL-7042.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.13.0
                   2.12.3
         Assignee: Claus Ibsen

Thanks for reporting

> Graceful shutdown of RabbitMQConsumer requires channel.close()
> --------------------------------------------------------------
>
>                 Key: CAMEL-7042
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7042
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-rabbitmq
>            Reporter: Fergus Nelson
>            Assignee: Claus Ibsen
>            Priority: Minor
>             Fix For: 2.12.3, 2.13.0
>
>
> doStop on the RabbitMQConsumer does not close the channel correctly. This doesn't cause
any problems on Jetty, but on Tomcat7 it prevented my app from shutting down gracefully. I
suggest the doStop method on the consumer should match that of the producer
>  protected void doStop() throws Exception {
>         super.doStop();
>         log.info("Stopping RabbitMQ consumer");
>         if (channel != null) {
>             log.debug("Closing channel: {}", channel);
>             channel.close();
>         }
>         if (conn != null) {
>             try {
>                 conn.close();
>             } catch (Exception ignored) {
>                 // ignored
>             }
>         }
>         channel = null;
>         conn = null;
>         if (executor != null) {
>             if (getEndpoint() != null && getEndpoint().getCamelContext() != null)
{
>                 getEndpoint().getCamelContext().getExecutorServiceManager().shutdownNow(executor);
>             } else {
>                 executor.shutdownNow();
>             }
>         }
>         executor = null;
>     }



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)

Mime
View raw message