Louisa Frison created ARTEMIS-3725:
--------------------------------------
Summary: Using durable topic subscriptions with FQQN,
artemis-jms-client tries to create an already existing queue -> AMQ229019
Key: ARTEMIS-3725
URL: https://issues.apache.org/jira/browse/ARTEMIS-3725
Project: ActiveMQ Artemis
Issue Type: Bug
Components: JMS
Affects Versions: 2.20.0
Reporter: Louisa Frison
I need to subscribe to an already existing multicast-queue and I tried that
using the FQQN like this:
//PREPARATIONS: create a multicast-queue named queueNameThatAlreadyExists under
the address {color:#172b4d}TESTADRESS{color}
_ActiveMQConnectionFactory cf = new
ActiveMQConnectionFactory("[tcp://127].0.0.1:61616");
cf.setClientID("clientID"); Connection connection = cf.createConnection();
connection.start(); Session session = connection.createSession(); Topic topic =
session.createTopic("TESTADRESS::queueNameThatAlreadyExists");
session.createDurableSubscriber(topic, "subscriptionName", null, false);_
This unfortunately triggers the following exception:
_Exception in thread "main" javax.jms.InvalidDestinationException: AMQ229019:
Queue queueNameThatAlreadyExists already exists on address TESTADRESS at
org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:549)
at
org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.sendBlocking(ChannelImpl.java:443)
at
org.apache.activemq.artemis.core.protocol.core.impl.ActiveMQSessionContext.createQueue(ActiveMQSessionContext.java:821)
at
org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.internalCreateQueue(ClientSessionImpl.java:2054)
at
org.apache.activemq.artemis.core.client.impl.ClientSessionImpl.createQueue(ClientSessionImpl.java:307)
at
org.apache.activemq.artemis.jms.client.ActiveMQSession.createQueue(ActiveMQSession.java:1274)
at
org.apache.activemq.artemis.jms.client.ActiveMQSession.createConsumer(ActiveMQSession.java:878)
at
org.apache.activemq.artemis.jms.client.ActiveMQSession.createDurableSubscriber(ActiveMQSession.java:598)
at Main.main(Main.java:18) Caused by:
ActiveMQQueueExistsException[errorType=QUEUE_EXISTS message=AMQ229019: Queue
queueNameThatAlreadyExists already exists on address TESTADRESS] ... 9 more_
I debugged it a little and it seems like in here:
[https://github.com/apache/activemq-artemis/blob/main/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/ActiveMQSession.java]
I think starting from Line 872 lies the reason: the existence of the multicast
queue gets checked with a queueQuery using a queuename of pattern
clientID.subscriptionName, which of course does not exist and subsequently
tries to create a queue with the queueName taken from the FQQN ... which does
exist ...
--
This message was sent by Atlassian Jira
(v8.20.1#820001)