You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2014/12/11 19:03:26 UTC
activemq git commit: https://issues.apache.org/jira/browse/AMQ-5484
Repository: activemq
Updated Branches:
refs/heads/trunk d25c52ccb -> 9bd070a8f
https://issues.apache.org/jira/browse/AMQ-5484
Ensure that the subscriptionByConsumerId map gets cleaned up when a
sender is closed.
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/9bd070a8
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/9bd070a8
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/9bd070a8
Branch: refs/heads/trunk
Commit: 9bd070a8f6337a3452a8529a0647970cc8c6deae
Parents: d25c52c
Author: Timothy Bish <ta...@gmail.com>
Authored: Thu Dec 11 13:02:47 2014 -0500
Committer: Timothy Bish <ta...@gmail.com>
Committed: Thu Dec 11 13:03:09 2014 -0500
----------------------------------------------------------------------
.../org/apache/activemq/transport/amqp/AmqpProtocolConverter.java | 3 +++
1 file changed, 3 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/9bd070a8/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
index c10eccf..29ed974 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
@@ -985,11 +985,14 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
public void onClose() throws Exception {
if (!closed) {
closed = true;
+ sender.setContext(null);
+ subscriptionsByConsumerId.remove(consumerId);
AmqpSessionContext session = (AmqpSessionContext) sender.getSession().getContext();
if (session != null) {
session.consumers.remove(info.getConsumerId());
}
+
RemoveInfo removeCommand = new RemoveInfo(consumerId);
removeCommand.setLastDeliveredSequenceId(lastDeliveredSequenceId);
sendToActiveMQ(removeCommand, null);