You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2017/06/02 20:25:04 UTC
[jira] [Commented] (ARTEMIS-1205) AMQP Shared Durable Subscriber
incorrect behaviour.
[ https://issues.apache.org/jira/browse/ARTEMIS-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16035360#comment-16035360 ]
Timothy Bish commented on ARTEMIS-1205:
---------------------------------------
This should probably be a discussion on the users list but just to answer a bit.
For dot point two, the broker is building up the subscription name using information from the AMQP client such as the remote container ID the subscription name which in this case include the global tag. This information is required due to the complexity of mapping AMQP to the JMS definition of shared subscriptions. I'm not an Artemis expert so I can't speak to whether there is some way to present this in an equivalent manner or not.
For dot point three I tried the following and it worked so you'd need to clarify what the test looked like, usually adding in reproducer tests on the JIRA makes it easier to reproduce what you are seeing.
{code}
@Test(timeout = 30000)
public void testTwoDurableSubscriptionsOnSameTopicWithDifferentSubName() throws Exception {
String durableClientId = getTopicName() + "-ClientId";
Connection connection = createConnection(durableClientId);
try {
connection.start();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
Topic topic = session.createTopic(getTopicName());
MessageConsumer consumer1 = session.createDurableSubscriber(topic, "DurbaleTopic1");
assertNotNull(consumer1);
assertNull(consumer1.receive(10));
MessageConsumer consumer2 = session.createDurableSubscriber(topic, "DurbaleTopic2");
assertNotNull(consumer2);
assertNull(consumer2.receive(10));
try {
session.unsubscribe("DurbaleTopic1");
fail("Should have thrown as subscription is in use.");
} catch (JMSException ex) {
}
try {
session.unsubscribe("DurbaleTopic2");
fail("Should have thrown as subscription is in use.");
} catch (JMSException ex) {
}
} finally {
connection.close();
}
}
{code}
> AMQP Shared Durable Subscriber incorrect behaviour.
> ---------------------------------------------------
>
> Key: ARTEMIS-1205
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1205
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Michael Andre Pearce
> Priority: Blocker
> Attachments: AMQPMissbehaviour.xlsx
>
>
> Summary observations :
> • There’s different behaviour between AMQP and the Artemis clients
> • There's UUID subscription name in the subscription topic when you’re using the AMQP client, you don’t set the client ID and you’ve selected a durable & shared subscription. It should just be the subscription name, like with the Artemis client.
> • The AMQP client seems to have a problem if you try to create a new durable, non-shared subscription on the same topic with the same client ID and a different subscription name.
>
> The artemis client doesn’t have a problem with this.
>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)