This closes #3007
This commit is contained in:
commit
c12d817ece
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue