Revert "ARTEMIS-2644 Include client id into non durable subscriber queue name"

This reverts commit be0fa47d63.
This commit is contained in:
brusdev 2020-03-05 19:09:03 +01:00 committed by Mike
parent d65867e64a
commit 45fe604859
2 changed files with 1 additions and 32 deletions

View File

@ -834,7 +834,7 @@ public class ActiveMQSession implements QueueSession, TopicSession {
throw new RuntimeException("Subscription name cannot be null for durable topic consumer");
// Non durable sub
queueName = ActiveMQDestination.createQueueNameForSubscription(false, connection.getClientID(), UUID.randomUUID().toString());
queueName = new SimpleString(UUID.randomUUID().toString());
createTemporaryQueue(dest, RoutingType.MULTICAST, queueName, coreFilterString, response);

View File

@ -31,12 +31,10 @@ import javax.jms.MessageProducer;
import javax.jms.QueueBrowser;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.TopicSession;
import org.apache.activemq.artemis.api.core.RoutingType;
import org.apache.activemq.artemis.api.core.SimpleString;
import org.apache.activemq.artemis.api.core.TransportConfiguration;
import org.apache.activemq.artemis.api.core.management.QueueControl;
import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
import org.apache.activemq.artemis.api.jms.ActiveMQJMSConstants;
import org.apache.activemq.artemis.api.jms.JMSFactoryType;
@ -551,35 +549,6 @@ public class JmsConsumerTest extends JMSTestBase {
}
}
@Test
public void testTopicConsumer() throws Exception {
String clientId = "TESTID";
conn = cf.createConnection();
conn.setClientID(clientId);
conn.start();
try {
Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
topic = session.createTopic(T_NAME);
MessageProducer producer = session.createProducer(topic);
MessageConsumer consumer = ((TopicSession)session).createSubscriber(topic);
for (Object queueControlObject : server.getManagementService().getResources(QueueControl.class)) {
QueueControl queueControl = (QueueControl)queueControlObject;
if (queueControl.getAddress().compareTo(T_NAME) == 0) {
assertTrue(queueControl.getName().contains(clientId));
break;
}
}
producer.send(session.createTextMessage("test"));
Assert.assertNotNull(consumer.receive(5000));
} finally {
conn.close();
}
}
@Test
public void testSharedConsumer() throws Exception {
conn = cf.createConnection();