This is an automated email from the ASF dual-hosted git repository.
jbertram pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 6ab4580156 ARTEMIS-5346 fix bug exposed by new logic
6ab4580156 is described below
commit 6ab458015689303db8878941abe1bc973299fc2e
Author: Justin Bertram <[email protected]>
AuthorDate: Thu Mar 13 10:07:11 2025 -0500
ARTEMIS-5346 fix bug exposed by new logic
---
.../activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
index b25359ef65..635d50c93b 100644
---
a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
+++
b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQConsumer.java
@@ -35,6 +35,7 @@ import org.apache.activemq.advisory.AdvisorySupport;
import org.apache.activemq.artemis.api.core.ICoreMessage;
import org.apache.activemq.artemis.api.core.Message;
import org.apache.activemq.artemis.api.core.QueueConfiguration;
+import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.core.client.impl.ClientConsumerImpl;
import org.apache.activemq.artemis.core.protocol.openwire.OpenWireConstants;
@@ -215,6 +216,7 @@ public class AMQConsumer {
if (info.getDestination().isComposite()) {
queueName = queueName.concat(physicalName);
}
+ QueueConfiguration queueConfiguration =
QueueConfiguration.of(queueName).setAddress(address).setRoutingType(RoutingType.MULTICAST).setFilterString(selector).setInternal(internalAddress);
QueueQueryResult result =
session.getCoreSession().executeQueueQuery(queueName);
if (result.isExists()) {
// Already exists
@@ -235,10 +237,10 @@ public class AMQConsumer {
session.getCoreSession().deleteQueue(queueName);
// Create the new one
-
session.getCoreSession().createQueue(QueueConfiguration.of(queueName).setAddress(address).setFilterString(selector).setInternal(internalAddress));
+ session.getCoreSession().createQueue(queueConfiguration);
}
} else {
-
session.getCoreSession().createQueue(QueueConfiguration.of(queueName).setAddress(address).setFilterString(selector).setInternal(internalAddress));
+ session.getCoreSession().createQueue(queueConfiguration);
}
} else {
// The consumer may be using FQQN in which case the queue might
already exist.
@@ -251,7 +253,7 @@ public class AMQConsumer {
queueName = SimpleString.of(UUID.randomUUID().toString());
}
-
session.getCoreSession().createQueue(QueueConfiguration.of(queueName).setAddress(address).setFilterString(selector).setDurable(false).setTemporary(true).setInternal(internalAddress));
+
session.getCoreSession().createQueue(QueueConfiguration.of(queueName).setAddress(address).setRoutingType(RoutingType.MULTICAST).setFilterString(selector).setDurable(false).setTemporary(true).setInternal(internalAddress));
}
return queueName;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact