Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Duplicate
-
2.26.0
-
None
-
None
Description
When an MQTT client tries to create a subscription that is rejected due to auth failure an address and queue are created and left behind.
For example, client ID client1 subscribes to # then the # address is created with a client1.# queue; this queue will quickly fill up with messages (as it captures all messages).
MQTTSubscriptionManager::addSubscription() creates the queue for the subscription but createConsumerForSubscriptionQueue() call throws an ActiveMQSecurityException when auth rejected; the created queue is not then cleaned up.
I'm using a wildcard address settings via config to cleanup these created queues, like this, but not a viable solution for all use cases:
config.addAddressSetting(wildcardConfiguration.getAnyWordsString(), new AddressSettings() .setAutoDeleteCreatedQueues(true) .setAutoDeleteAddressesDelay(1) .setAutoDeleteQueuesMessageCount(-1L) );
But this does not seem like good default behaviour as these leaked queues can quickly fill up with messages.
Attachments
Issue Links
- duplicates
-
ARTEMIS-4249 Failure to create internal MQTT consumer can orphan subscription queue
- Closed