[
https://issues.apache.org/jira/browse/ARTEMIS-1932?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16522692#comment-16522692
]
Justin Bertram commented on ARTEMIS-1932:
-----------------------------------------
I missed the auto-delete settings. Adding those setting does cause the test to
fail. However, this is the expected behavior. A bit of context may help...
When a STOMP client subscribes to an anycast destination (whether that's a
"normal" destination like {{/queue/test.foo}} or a wildcard destination like
{{/queue/test.*}}) the corresponding address & queue are created if they don't
already exist (and the configuration allows) and then a consumer is created on
the queue. All messages sent to the address (or any matching address in the
case of a wildcard) are put into the queue and shared among the consumers of
that queue (i.e. the STOMP subscribers).
When a STOMP client unsubscribes from an anycast destination the previously
created consumer is removed, but the address and queue itself remain unless the
configuration & runtime environment allows them to be auto-deleted (which they
don't in your case).
> Wildcard subscriptions create permanent bindings (STOMP)
> --------------------------------------------------------
>
> Key: ARTEMIS-1932
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1932
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Lionel Cons
> Priority: Major
> Attachments: ARTEMIS-1932.text, broker.xml
>
>
> When using STOMP to create a wildcard subscription to {{/queue/test.\*}},
> Artemis creates a {{/queue/test.\*}} address and an eponymous ANYCAST queue
> within. So far, so good.
> However, these automatically created objects are permanent and survive at the
> end of the connection.
> Here is the test scenario:
> - start with an empty broker
> - connect
> - subscribe to {{/queue/test.\*}}
> - unsubscribe
> - disconnect
> - bug => the address and queue remain
> - connect
> - send a message to {{/queue/test.foo}}
> - bug => the message appears in the {{/queue/test.\*}} queue (in addition to
> {{/queue/test.foo}})
> FWIW, I'm using {{default-address-routing-type}} to make sure destinations
> starting with {{/queue/}} act like a queue (see ARTEMIS-1906).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)