You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2013/12/20 19:10:11 UTC
[jira] [Resolved] (CAMEL-7042) Graceful shutdown of
RabbitMQConsumer requires channel.close()
[ 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)