From 90f96a02992b64ba330c6e6b62e6a8fc3d4d8120 Mon Sep 17 00:00:00 2001 From: u8675309 <58795251+u8675309@users.noreply.github.com> Date: Mon, 12 Jun 2023 12:10:54 -0600 Subject: [PATCH] [AMQ-9283] Fix memory leak with STOMP unsubscribe --- .../org/apache/activemq/transport/stomp/ProtocolConverter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java b/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java index 1f6f9069d5..9981452e63 100644 --- a/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java +++ b/activemq-stomp/src/main/java/org/apache/activemq/transport/stomp/ProtocolConverter.java @@ -718,6 +718,7 @@ public class ProtocolConverter { if (subscriptionId != null) { StompSubscription sub = this.subscriptions.remove(subscriptionId); if (sub != null) { + subscriptionsByConsumerId.remove(sub.getConsumerInfo().getConsumerId()); sendToActiveMQ(sub.getConsumerInfo().createRemoveCommand(), createResponseHandler(command)); return; }