From 9b5acf4fa166467b5846a810aca4ad0c976ccaf5 Mon Sep 17 00:00:00 2001 From: "Jonas B. Lim" Date: Tue, 24 Jul 2007 11:55:17 +0000 Subject: [PATCH] patch for https://issues.apache.org/activemq/browse/AMQ-1320 git-svn-id: https://svn.apache.org/repos/asf/activemq/branches/activemq-4.1@559015 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/AdvisoryConsumer.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java b/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java index 8106ab89c8..291fe1b654 100755 --- a/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java +++ b/activemq-core/src/main/java/org/apache/activemq/AdvisoryConsumer.java @@ -27,9 +27,12 @@ import org.apache.activemq.command.DataStructure; import org.apache.activemq.command.DestinationInfo; import org.apache.activemq.command.MessageAck; import org.apache.activemq.command.MessageDispatch; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; public class AdvisoryConsumer implements ActiveMQDispatcher { + private static final transient Log log = LogFactory.getLog(AdvisoryConsumer.class); private final ActiveMQConnection connection; private ConsumerInfo info; private boolean closed; @@ -48,6 +51,11 @@ public class AdvisoryConsumer implements ActiveMQDispatcher { public void dispose() { if (!closed) { + try { + this.connection.asyncSendPacket(info.createRemoveCommand()); + } catch (JMSException e) { + log.info("Failed to send remove command: " + e, e); + } this.connection.removeDispatcher(info.getConsumerId()); closed = true; }