[prev in list] [next in list] [prev in thread] [next in thread]
List: activemq-commits
Subject: [activemq-artemis] branch 2.6.x updated: ARTEMIS-2242 Reverting regression caused by ARTEMIS-2229
From: clebertsuconic () apache ! org
Date: 2019-01-29 16:28:35
Message-ID: 154877931504.18737.1568554810381204899 () gitbox ! apache ! org
[Download RAW message or body]
This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/2.6.x by this push:
new 2d96429 ARTEMIS-2242 Reverting regression caused by ARTEMIS-2229
2d96429 is described below
commit 2d96429837664c3a84fc119032f789e3563e3765
Author: Clebert Suconic <clebertsuconic@apache.org>
AuthorDate: Tue Jan 29 10:50:41 2019 -0500
ARTEMIS-2242 Reverting regression caused by ARTEMIS-2229
Revert "ARTEMIS-2229 Qpid jms consumer cannot receive from multicast queue using \
FQQN"
This reverts commit 882da19c8a9a2ad12ca089d45445fe408d850330.
(cherry picked from commit f4436a9f72afeb8117ecd6e377df8198eeec9aa3)
---
.../protocol/amqp/broker/AMQPSessionCallback.java | 7 ++---
.../amqp/proton/ProtonServerSenderContext.java | 10 ++-----
.../amqp/AmqpFullyQualifiedNameTest.java | 34 ----------------------
3 files changed, 4 insertions(+), 47 deletions(-)
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java \
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
index 8a5dcef..1ca4410 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPSessionCallback.java
@@ -302,11 +302,8 @@ public class AMQPSessionCallback implements SessionCallback {
}
// if auto-create we will return whatever type was used before
- if (queueQueryResult.isExists() && !queueQueryResult.isAutoCreated()) {
- //if routingType is null we bypass the check
- if (routingType != null && queueQueryResult.getRoutingType() != \
routingType) {
- throw new IllegalStateException("Incorrect Routing Type for queue, \
expecting: " + routingType);
- }
+ if (queueQueryResult.isExists() && !queueQueryResult.isAutoCreated() && \
queueQueryResult.getRoutingType() != routingType) { + throw new \
IllegalStateException("Incorrect Routing Type for queue, expecting: " + routingType); \
}
return queueQueryResult;
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java \
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
index 72e8eba..24dcff0 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
@@ -290,10 +290,7 @@ public class ProtonServerSenderContext extends \
ProtonInitializable implements Pr
if (multicast && !routingTypes.contains(RoutingType.MULTICAST)) {
throw new ActiveMQAMQPIllegalStateException("Address " + addressToUse \
+ " is not configured for topic support");
} else if (!multicast && !routingTypes.contains(RoutingType.ANYCAST)) {
- //if client specifies fully qualified name that's allowed, don't \
throw exception.
- if (queueNameToUse == null) {
- throw new ActiveMQAMQPIllegalStateException("Address " + \
addressToUse + " is not configured for queue support");
- }
+ throw new ActiveMQAMQPIllegalStateException("Address " + addressToUse \
+ " is not configured for queue support"); }
} else {
// if not we look up the address
@@ -391,10 +388,7 @@ public class ProtonServerSenderContext extends \
ProtonInitializable implements Pr }
} else {
if (queueNameToUse != null) {
- //a queue consumer can receive from a multicast queue if it uses a \
fully qualified name
- //setting routingType to null means do not check the routingType \
against the Queue's routing type.
- routingTypeToUse = null;
- SimpleString matchingAnycastQueue = getMatchingQueue(queueNameToUse, \
addressToUse, null); + SimpleString matchingAnycastQueue = \
getMatchingQueue(queueNameToUse, addressToUse, RoutingType.ANYCAST); if \
(matchingAnycastQueue != null) { queue = matchingAnycastQueue;
} else {
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpFullyQualifiedNameTest.java \
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpFullyQualifiedNameTest.java
index d8c7b2f..1bcf9e1 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpFullyQualifiedNameTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpFullyQualifiedNameTest.java
@@ -203,40 +203,6 @@ public class AmqpFullyQualifiedNameTest extends \
JMSClientTestSupport { }
@Test
- public void testQueueConsumerReceiveTopicUsingFQQN() throws Exception {
-
- SimpleString queueName1 = new SimpleString("sub.queue1");
- SimpleString queueName2 = new SimpleString("sub.queue2");
- server.createQueue(multicastAddress, RoutingType.MULTICAST, queueName1, null, \
false, false);
- server.createQueue(multicastAddress, RoutingType.MULTICAST, queueName2, null, \
false, false);
- Connection connection = createConnection(false);
-
- try {
- connection.start();
- Session session = connection.createSession(false, \
Session.AUTO_ACKNOWLEDGE);
- javax.jms.Queue fqqn1 = session.createQueue(multicastAddress.toString() + \
"::" + queueName1);
- javax.jms.Queue fqqn2 = session.createQueue(multicastAddress.toString() + \
"::" + queueName2);
-
- MessageConsumer consumer1 = session.createConsumer(fqqn1);
- MessageConsumer consumer2 = session.createConsumer(fqqn2);
-
- Topic topic = session.createTopic(multicastAddress.toString());
- MessageProducer producer = session.createProducer(topic);
-
- producer.send(session.createMessage());
-
- Message m = consumer1.receive(2000);
- assertNotNull(m);
-
- m = consumer2.receive(2000);
- assertNotNull(m);
-
- } finally {
- connection.close();
- }
- }
-
- @Test
public void testQueue() throws Exception {
server.createQueue(anycastAddress, RoutingType.ANYCAST, anycastQ1, null, true, \
false, -1, false, true);
server.createQueue(anycastAddress, RoutingType.ANYCAST, anycastQ2, null, true, \
false, -1, false, true);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic