[ https://issues.apache.org/jira/browse/ARTEMIS-2138?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robbie Gemmell resolved ARTEMIS-2138. ------------------------------------- Resolution: Invalid >From what I see the test actually should fail. Is there a particular reason >you expected it to work? You don't have a ClientID set on the Connections, so their shared subscriptions are shared among all such connections without a ClientID set. They are using the same subscription namespace, so they cant have two different shared subscriptions with the same name at the same time. If you set a ClientID, then sharing is only on that ClientID/Connection as the subscription names are scoped to the ClientID, so two different Connections can have a subscription with the same name at the same time. > [AMQP] Creating Shared Subscriptions with the same name on different queues > fails. > ---------------------------------------------------------------------------------- > > Key: ARTEMIS-2138 > URL: https://issues.apache.org/jira/browse/ARTEMIS-2138 > Project: ActiveMQ Artemis > Issue Type: Bug > Components: AMQP, Broker > Affects Versions: 2.6.3 > Reporter: Johan Stenberg > Priority: Major > Attachments: Artemis2138_AmqpSharedConsumerTest.java > > > The following exception occurs when e.g. two clients try to create shared > subscription on different topics with the same subscription name. > {noformat} > ActiveMQQueueExistsException[errorType=QUEUE_EXISTS message=AMQ119019: Queue > foo:shared-volatile:global already exists on address topics.cats] > at > org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:2763) > at > org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.createQueue(ActiveMQServerImpl.java:1690) > at > org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:594) > at > org.apache.activemq.artemis.core.server.impl.ServerSessionImpl.createQueue(ServerSessionImpl.java:634) > {noformat} > For example > {code:java} > // client 1 subscribes to topics.cats with subscription name "foo" > Session jmsSess1 = jmsClient1.createSession(); > Topic jmsTopicCats = jmsSess1.createTopic("topics.cats"); > jmsSess1.createSharedConsumer(jmsTopicCats , "foo"); > // client 2 subscribes to topics.dogs with subscription name "foo" > Session jmsSess2 = jmsClient2.createSession(); > Topic jmsTopicDogs = jmsSess2.createTopic("topics.dogs"); > jmsSess2.createSharedConsumer(jmsTopicDogs, "foo"); // this fails > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)