[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=16055419#comment-16055419 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user asfgit closed the pull request at: https://github.com/apache/activemq-artemis/pull/1349 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16055417#comment-16055417 ] ASF subversion and git services commented on ARTEMIS-1205: -- Commit 1bfa1ad4fe9e6e8fae9346522e58d3e59f7fc2fa in activemq-artemis's branch refs/heads/master from [~michael.andre.pearce] [ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=1bfa1ad ] ARTEMIS-1205: AMQP Shared Durable Subscriber - Document Update Update documents for new configuration toggle for 'amqp-use-core-subscription-naming ' > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16054810#comment-16054810 ] ASF GitHub Bot commented on ARTEMIS-1205: - GitHub user michaelandrepearce opened a pull request: https://github.com/apache/activemq-artemis/pull/1349 ARTEMIS-1205: AMQP Shared Durable Subscriber - Document Update Update documents for new configuration toggle for 'amqp-use-core-subscription-naming ' You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaelandrepearce/activemq-artemis ARTEMIS-1205-DOCS Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/1349.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1349 commit b4848729e8c7ab17e25d6135eb5d910cee1a8f7b Author: Michael Andre PearceDate: 2017-06-19T22:01:28Z ARTEMIS-1205: AMQP Shared Durable Subscriber - Document Update Update documents for new configuration toggle for 'amqp-use-core-subscription-naming ' > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16053853#comment-16053853 ] ASF subversion and git services commented on ARTEMIS-1205: -- Commit 44b7e455cb93ca0151793ee24de40b0a7a58301b in activemq-artemis's branch refs/heads/master from [~michael.andre.pearce] [ https://git-wip-us.apache.org/repos/asf?p=activemq-artemis.git;h=44b7e45 ] ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour Use AcitveMQDestination for subscription naming, fixing and aligning queue naming in the process. The change is behind a configuration toggle so to avoid causing any breaking changes for uses not expecting. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16053855#comment-16053855 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user asfgit closed the pull request at: https://github.com/apache/activemq-artemis/pull/1337 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16053642#comment-16053642 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user mtaylor commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @michaelandrepearce Thanks Michael. I'll do another full suite run here. Once it passes I will merge. Thanks again for the great work. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16053099#comment-16053099 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @mtaylor post fixing the miss commit, did a fresh checkout to avoid further commit missing issues, ran the mvn commands as given seems all good now, apologies on this. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16053097#comment-16053097 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @mtaylor just pushed, i had missed committed the revert on that class, am re-running locally with the commands you gave to avoid your time. Once done will ping again. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16053094#comment-16053094 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 Re AmqpClientTestSupport i thought i removed the paramatized from this based on review comment i got (earlier i had this), maybe i missed some bit in my commit, will check. Thanks. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16052791#comment-16052791 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user mtaylor commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @michaelandrepearce There were 46 additional test failures when running the full suite. I've just got around to investigating. Some of them look to be unrelated (we do have a few tests that fail intermittently). The majority are due to the update to AmqpClientTestSupport. There are a bunch (44) of sub classes that need updating in order to run with Parameterized.class. e.g. org.apache.activemq.artemis.tests.integration.amqp.AmqpExpiredMessageTest.initializationError Could you update please. To run the full test suite build the project, then run tests with the test profile. ``` mvn clean install -Pdev -Pextra-tests -DskipTests mvn test -Ptest ``` Thank you. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16052260#comment-16052260 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @mtaylor i notice this didn't get merged, is anything outstanding on this i need to address? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16050296#comment-16050296 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user mtaylor commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @gemmellr Thanks for the feedback on this one Robbie. I think my opinions were reflected on the related PR by other members. This approach looks good to me. Re: Configuration, we may want to pull out protocol specific properties into their own configuration objects (like we have with HA policies). e.g. <...>. But that will require some refactor, which can come later if people feel it's necessary. I think what @michaelandrepearce has done here is fine. I'll kick off a full test suite run before merging. Cheers > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16050278#comment-16050278 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 Looks good to me, but would be better if folks with more of a clue about the broker and its config etc gave things a look before they merge. @mtaylor, @jbertram ? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049597#comment-16049597 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r122049646 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java --- @@ -74,6 +79,17 @@ protected MBeanServer mBeanServer = MBeanServerFactory.createMBeanServer(); + @Parameterized.Parameters(name = "{index}: amqpUseCoreSubscriptionNaming={0}") + public static Collection
[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=16049596#comment-16049596 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r122049574 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + if (shared) { +if (queue.contains("|")) { + queue = queue.split("\\|")[0]; +} +if (isVolatile) { + queue += ":shared-volatile"; +} +if (global) { + queue += ":global"; +} } + return queue; + } else { + final boolean durable = !isVolatile; + final String subscriptionName = pubId.contains("|") ? pubId.split("\\|")[0] : pubId; + final String clientID = clientId == null || clientId.isEmpty() || global || pubId.endsWith("|global") ? null : clientId; --- End diff -- cheers :) > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049595#comment-16049595 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r122049520 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; --- End diff -- done > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049286#comment-16049286 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @gemmellr great, thanks I've closed therefor the other PR. Thanks also for the code for the global, seems to do the job nicely :), updated the change with this. I've re-factored the tests based on your feedback, just doing the shared and durable tests cases now. Also I've put back in the global check on the existing queue naming. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049283#comment-16049283 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1328 @gemmellr @jbertram im closing this one now, based on we are agreed we are going with https://github.com/apache/activemq-artemis/pull/1337 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049284#comment-16049284 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce closed the pull request at: https://github.com/apache/activemq-artemis/pull/1328 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049087#comment-16049087 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @michaelandrepearce > I assume you're happier with this approach then? can you confirm this? Yep, I did comment around this yesterday but I put it on the JIRA as thats where I actually read your question, but I'd overlooked you asked it on one of the other PRs. https://issues.apache.org/jira/browse/ARTEMIS-1205?focusedCommentId=16048159=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16048159 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049080#comment-16049080 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121922296 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java --- @@ -74,6 +79,17 @@ protected MBeanServer mBeanServer = MBeanServerFactory.createMBeanServer(); + @Parameterized.Parameters(name = "{index}: amqpUseCoreSubscriptionNaming={0}") + public static Collection
[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=16049075#comment-16049075 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121921232 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; --- End diff -- Ok. I think we should instead leave the fix (checking the global flag and not adding the container-id to the queue name) in place to still resolve the original bug. Its that or raising another PR to put it back in after taking it back out in this one. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16049068#comment-16049068 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121920556 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + if (shared) { +if (queue.contains("|")) { + queue = queue.split("\\|")[0]; +} +if (isVolatile) { + queue += ":shared-volatile"; +} +if (global) { + queue += ":global"; +} } + return queue; + } else { + final boolean durable = !isVolatile; + final String subscriptionName = pubId.contains("|") ? pubId.split("\\|")[0] : pubId; + final String clientID = clientId == null || clientId.isEmpty() || global || pubId.endsWith("|global") ? null : clientId; --- End diff -- Yep, as I mentioned on the JIRA/other PRs the lack of a Source during unsubscribe is an unfortunate (but unavoidable) complexity of the JMS subscription mapping, and the broker instead needs to look for the 'global' hint in the link desired capabilities the JMS client sent when doing the 'null source lookup' needed during unsubscribe. Something like this is what I meant: ``` --- 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 @@ -68,6 +68,7 @@ import org.apache.qpid.proton.amqp.transport.ReceiverSettleMode; import org.apache.qpid.proton.amqp.transport.SenderSettleMode; import org.apache.qpid.proton.engine.Delivery; import org.apache.qpid.proton.engine.EndpointState; +import org.apache.qpid.proton.engine.Link; import org.apache.qpid.proton.engine.Sender; import org.jboss.logging.Logger; @@ -188,6 +189,8 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr // subscription queue String clientId = getClientId(); String pubId = sender.getName(); + global = hasRemoteDesiredCapability(sender, GLOBAL); + queue = createQueueName(clientId, pubId, true, global, false); QueueQueryResult result = sessionSPI.queueQuery(queue, RoutingType.MULTICAST, false); multicast = true; @@ -720,6 +723,19 @@ public class ProtonServerSenderContext extends ProtonInitializable implements Pr } } + private static boolean hasRemoteDesiredCapability(Link link, Symbol capability) { + Symbol[] remoteDesiredCapabilities = link.getRemoteDesiredCapabilities(); + if (remoteDesiredCapabilities != null) { + for (Symbol cap : remoteDesiredCapabilities) { +if (capability.equals(cap)) { + return true; +} + } + } + + return false; + } + private static boolean hasCapabilities(Symbol symbol, Source source) { if (source != null) { if (source.getCapabilities() != null) { ``` > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >
[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=16048518#comment-16048518 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121822097 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java --- @@ -155,6 +155,7 @@ protected ActiveMQServer createServer(int port) throws Exception { server.getConfiguration().setPagingDirectory(server.getConfiguration().getPagingDirectory() + port); server.getConfiguration().setJMXManagementEnabled(true); server.getConfiguration().setMessageExpiryScanPeriod(5000); + server.getConfiguration().setUseLegacyAMQPQueueNaming(false); --- End diff -- forgot theres > @Parameterized for this :) > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048516#comment-16048516 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @gemmellr hopefully all now addressed. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048350#comment-16048350 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1337 @gemmellr thanks for the constructive review comments, ill look to address them, I assume you're happier with this approach then? can you confirm this? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048347#comment-16048347 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121783550 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java --- @@ -155,6 +155,7 @@ protected ActiveMQServer createServer(int port) throws Exception { server.getConfiguration().setPagingDirectory(server.getConfiguration().getPagingDirectory() + port); server.getConfiguration().setJMXManagementEnabled(true); server.getConfiguration().setMessageExpiryScanPeriod(5000); + server.getConfiguration().setUseLegacyAMQPQueueNaming(false); --- End diff -- @gemmellr i really/ideally like to have the tests run with it both on and off, any idea how to do that without a massive copy paste exercise. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048343#comment-16048343 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121783273 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/client/AMQPClientConnectionFactory.java --- @@ -39,20 +39,22 @@ private final String containerId; private final MapconnectionProperties; private final int ttl; + private final boolean useLegacyQueueName; public AMQPClientConnectionFactory(ActiveMQServer server, String containerId, Map connectionProperties, int ttl) { this.server = server; this.containerId = containerId; this.connectionProperties = connectionProperties; this.ttl = ttl; + this.useLegacyQueueName = false; --- End diff -- Its used just for testing. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048344#comment-16048344 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121783316 --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java --- @@ -442,6 +442,8 @@ public static String getDefaultHapolicyBackupStrategy() { // Default period to wait between configuration file checks public static final long DEFAULT_CONFIGURATION_FILE_REFRESH_PERIOD = 5000; + public static final boolean DEFAULT_LEGACY_AMQP_QUEUE_NAMING = true; --- End diff -- sure > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048339#comment-16048339 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121783205 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java --- @@ -74,16 +74,20 @@ private final ProtonProtocolManager protocolManager; + private final boolean useLegacyQueueNaming; --- End diff -- sure > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048338#comment-16048338 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121783157 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; --- End diff -- Yes, i was reverting the changes so that all the changes are only in the code block when toggled on to avoid any compatibility issues. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048335#comment-16048335 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121782960 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + if (shared) { +if (queue.contains("|")) { + queue = queue.split("\\|")[0]; +} +if (isVolatile) { + queue += ":shared-volatile"; +} +if (global) { + queue += ":global"; +} } + return queue; + } else { + final boolean durable = !isVolatile; + final String subscriptionName = pubId.contains("|") ? pubId.split("\\|")[0] : pubId; + final String clientID = clientId == null || clientId.isEmpty() || global || pubId.endsWith("|global") ? null : clientId; --- End diff -- @gemmellr it seems when you do a JMS unsubscribe from the AMQP client, the source is null as such don't have this field, if you could point me to where else we could gain this info in a better fashion? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048159#comment-16048159 ] Robbie Gemmell commented on ARTEMIS-1205: - Of the options for change in 2.2.0, yes I think https://github.com/apache/activemq-artemis/pull/1337 (with some fixups around the review comments above, fixing the original bug etc) is preferable to the previous changes from https://github.com/apache/activemq-artemis/pull/1316 plus + https://github.com/apache/activemq-artemis/pull/1328. This would give a single server side option to align the behaviours completely now if needed, but without breaking existing working subscriptions but still fixing the original bug. We could then look to improve the Core client naming and server side AMQP naming and fully align them by default in a later major release. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048145#comment-16048145 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121733233 --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java --- @@ -442,6 +442,8 @@ public static String getDefaultHapolicyBackupStrategy() { // Default period to wait between configuration file checks public static final long DEFAULT_CONFIGURATION_FILE_REFRESH_PERIOD = 5000; + public static final boolean DEFAULT_LEGACY_AMQP_QUEUE_NAMING = true; --- End diff -- It would be good to mention it is "subscription queues" being affected in the constant name. I'm not sure calling the still-default behaviour 'legacy' makes sense, especially as a future change might not just be to flip the boolean here to false but perhaps instead change both the AMQP and Core naming schemes to something without the existing issues. Perhaps flipping the boolean now and calling it something like "USE_CORE_SUBSCRIPTION_QUEUE_NAMES_FOR_AMQP"? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048140#comment-16048140 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121735447 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; --- End diff -- This line looks to be restoring the original bug where the container-id (here being passed as clientId, when really the JMS client has no ClientID, and so uses a 'global subscription') was added to the queue name for global subscriptions when it shouldn't have been? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048141#comment-16048141 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121733939 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/client/AMQPClientConnectionFactory.java --- @@ -39,20 +39,22 @@ private final String containerId; private final MapconnectionProperties; private final int ttl; + private final boolean useLegacyQueueName; public AMQPClientConnectionFactory(ActiveMQServer server, String containerId, Map connectionProperties, int ttl) { this.server = server; this.containerId = containerId; this.connectionProperties = connectionProperties; this.ttl = ttl; + this.useLegacyQueueName = false; --- End diff -- I don't know what this class is actually used for, but might it be better to use the same value as the other default? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048143#comment-16048143 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121734250 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/AMQPConnectionContext.java --- @@ -74,16 +74,20 @@ private final ProtonProtocolManager protocolManager; + private final boolean useLegacyQueueNaming; --- End diff -- As with the constant, indicating its for subscription queue name behaviour would be a little clearer. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048142#comment-16048142 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121737539 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpClientTestSupport.java --- @@ -155,6 +155,7 @@ protected ActiveMQServer createServer(int port) throws Exception { server.getConfiguration().setPagingDirectory(server.getConfiguration().getPagingDirectory() + port); server.getConfiguration().setJMXManagementEnabled(true); server.getConfiguration().setMessageExpiryScanPeriod(5000); + server.getConfiguration().setUseLegacyAMQPQueueNaming(false); --- End diff -- I don't think the tests should override the default like this, it means none of the tests would be testing the default behaviour of the broker. Explicit tests that verify non-default behaviours would be more appropriate. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16048144#comment-16048144 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1337#discussion_r121737014 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -733,20 +734,31 @@ private static boolean hasCapabilities(Symbol symbol, Source source) { return false; } - private static String createQueueName(String clientId, + private static String createQueueName(boolean useLegacyQueueNaming, + String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; - if (shared) { - if (queue.contains("|")) { -queue = queue.split("\\|")[0]; - } - if (isVolatile) { -queue = "nonDurable" + "." + queue; + if (useLegacyQueueNaming) { + String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + if (shared) { +if (queue.contains("|")) { + queue = queue.split("\\|")[0]; +} +if (isVolatile) { + queue += ":shared-volatile"; +} +if (global) { + queue += ":global"; +} } + return queue; + } else { + final boolean durable = !isVolatile; + final String subscriptionName = pubId.contains("|") ? pubId.split("\\|")[0] : pubId; + final String clientID = clientId == null || clientId.isEmpty() || global || pubId.endsWith("|global") ? null : clientId; --- End diff -- As mentioned on the JIRA/other PR, the broker should not be inspecting the link name (here passed as 'pubId' it seems) to see if it ends in "|global" specifically and then acting differently, but instead ensure that the 'global' flag passed is correct. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16047717#comment-16047717 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1328 @jbertram Based on discussion https://github.com/apache/activemq-artemis/pull/1316 i have also raise an alternative solution, thats server side. If you can hold merging till we get a semi-acceptance of either the approach currently doing or if we go with the alternative i just raised (i suspect the alternative might end up being the one people are more happy with). > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16047702#comment-16047702 ] ASF GitHub Bot commented on ARTEMIS-1205: - GitHub user michaelandrepearce opened a pull request: https://github.com/apache/activemq-artemis/pull/1337 ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour Use AcitveMQDestination for subscription naming, fixing and aligning queue naming in the process. The change is behind a configuration toggle so to avoid causing any breaking changes for uses not expecting. This is a replacement option, to: https://github.com/apache/activemq-artemis/pull/1328 That makes it config on the server side for AMQP. Also addressing any concerns about breaking anything as everything is behind a configurable switch. Based on the discussion here, where is seems this maybe more preferable. https://github.com/apache/activemq-artemis/pull/1316 You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaelandrepearce/activemq-artemis ARTEMIS-1205-AMQPConfig Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/1337.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1337 commit d7ebc78e8e57eb902fb0fd2d1037d4d6b75daa56 Author: Michael Andre PearceDate: 2017-06-13T08:23:33Z ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour Use AcitveMQDestination for subscription naming, fixing and aligning queue naming in the process. The change is behind a configuration toggle so to avoid causing any breaking changes for uses not expecting. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16047541#comment-16047541 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1328 @jbertram thanks for the feedback, reverted back unused methods, and also removed the duplication. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16046818#comment-16046818 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user jbertram commented on the issue: https://github.com/apache/activemq-artemis/pull/1328 Couple of things... * The methods createQueueNameForLegacySubscription and createQueueNameForAmqpCompatibleSubscription in org.apache.activemq.artemis.jms.client.ActiveMQDestination are almost exactly the same. I'd rather not have that kind of code duplication. You could just replace the logic in createQueueNameForSubscription with the logic from createQueueNameForLegacySubscription and refactor escape to take the amqpCompatibleQueues boolean. That's just one way to do; there's lots of ways to avoid the code duplication here. * I know it's tempting to make unrelated but worthwhile changes in a PR (e.g. removing the unused method decomposeQueueNameForDurableSubscription). I've done it myself. However, it makes the diff harder to read and understand since the change isn't clearly related. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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.4.14#64029)
[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=16044436#comment-16044436 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user tabish121 commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 I'm in agreement with Robbie on this, I think the ease of which the subscription names and "regular queue" names can collide should be avoided. It's much easier to tell people (document) how to avoid this collision if we have in place some means of at least making it something you couldn't do without putting some deliberate effort into it or have some amazingly bad luck on your side. Lining up Core and AMQP mapping names for subscriptions seems like a good thing to add to a 3.0 task list for changes that require a major version bump. In the meantime if some configuration switch is added to control using one naming scheme or another it ought to be added as an already deprecated sort of thing that is going away in the next major version. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16044270#comment-16044270 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 I seem to be the only one that considers the direct collision of simple 'regular queue' names and 'no-Client shared subscription backing queue' names to be an issue. If everyone else is happy I'm not standing in the way. I just feel the need to point it out as I think it is a fairly annoying usability issue that shouldnt exist. Personally I'd change both the Core and AMQP sides together in a later 3.0.0 release. If the alignment is done then I'd possibly go ahead and align the AMQP "." handling behaviour as well, even though it could break some existing subscriptions (hopefully there aren't [m]any affected), given other alignment issues would actually be lessened by it and if the aim is alignment then it would make sense they actually do align. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16044263#comment-16044263 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user gemmellr commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Given that all the queues exist in the same ultimate namespace, there will obviously always be potential for collisions unless 'regular queues' had some name mangling applied too (which is undesirable, and was removedin 2.x because of it). I don't dispute this, I just think it is a question of severity and whether one subscription type by default will/could easily collide with another as well as entirely unrelated things such as regular queues with simple names. Someone with a queue called "foo", and a topic called "bar" and a client who makes a no-ClientID subscription named "foo", should be allowed to. With the existing format (minus the container-id bug) they would be able to on the AMQP side. With the aligned one they will not as the queue and subscription names would be directly used the same way without attempt to avoid collision in use of these essentially unrelated values. The addition of a ":global" suffix was not incorrect, the implementation simply had a related bug in it. The quoted JMS spec excerpt (I assume is from createSharedDurableConsumer, not the linked unsubscribe) and example are not actually applicable to it, as the ":global" suffix only applies for shared subscriptions on connections without a ClientID, which cant have non-shared durable subscriptions (i.e they need a ClientID to be set). The ":global" suffix exists precisely to separate those 'global sub backing' queue names from being named directly the same way as regular queues and other sub types when presented with simple name "foo". If you go to the effort of naming all your regular queues "foo:global" etc then I agree you can still cause the same collisions, but I think at that point its actually reasonble to say there is a naming convention and you need to take it into account, as its far less likely to be hit and the default for every simple name "foo" was not for them to collide. The ":shared-volatile" and ":global" suffixes also help prevent a durable [shared] subscription backing queue name from easily colliding with a non-durable one, or with those from connections with ClientID's. Removing those with the alignment, that then becomes somewhat more likely, unless the "." escaping is done, which as discussed could break existing subscriptions. Obviously, use of regular queues could again be made to collide names with any naming convention used here, but again for me the key bit is typically only with some deliberate effort. The issue noted with unsubscribe (which I was planning to test+fix after this JIRA was complete) will most likely be that the broker is not looking in the correct place for the "global" flag as it applies during unsubscribe. This is unfortunately in a different place than it is the rest of the time due to how the complicated AMQP<->JMS mapping must work for shared subs. Typically the flag is added as an AMQP 'source capability', but during unsubscribe the is no 'source' information present so instead it gets passed as a 'link desired capability'. The change to add the below would actually work for the JMS client, but would typically fail/be-incorrect for any non-JMS clients using the mechanism. Whats needed is inspecting the link capabilities and passing the correct global value into the naming method. ``` + if (pubId.endsWith("|global")) { + global = true; + } ``` > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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
[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=16043736#comment-16043736 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Re concerns on the overlap of a shared consumer queue and another queue space, it is already possible to make a jms queue named myClient.mySub:global as such we already have collision issue since 2.0. This change does not increase this risk/problem. I think it is something that users will have to be aware of and just configure/ensure they don't do things that risk that (as it is already an issue!) > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043651#comment-16043651 ] ASF GitHub Bot commented on ARTEMIS-1205: - GitHub user michaelandrepearce opened a pull request: https://github.com/apache/activemq-artemis/pull/1328 ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour adding support into Artemis Client to support AMQP compatibility with escape behaviour. adding test, and ensuring unsubscirbe works as per spec for AMQP You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaelandrepearce/activemq-artemis ARTEMIS-1205 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/1328.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1328 commit ac914f27f9d5d042bcebfc1c93833fca5cdc4ec6 Author: Michael Andre PearceDate: 2017-06-08T19:38:09Z ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour adding support into Artemis Client to support AMQP compatibility with escape behaviour. adding test, and ensuring unsubscirbe works as per spec for AMQP > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043593#comment-16043593 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 After looking to revert this. I came back across another reason why we had to do this. There still is a fundamental problem with leaving :global in as it stands (so this bit to make it meet spec i can't remove). We should note, as per JMS Spec:http://docs.oracle.com/javaee/7/api/javax/jms/Session.html#unsubscribe-java.lang.String- " A shared durable subscription and an unshared durable subscription may not have the same name and client identifier (if set). If an unshared durable subscription already exists with the same name and client identifier (if set) then a JMSException is thrown. " This means the current behaviour in AMQP here is wrong, as shared and unshared with the same subscription name are not making the same queue as such above is invalid. e.g. if clientId = myClient; createSharedDurableConsumer(myTopic, "mySub") will create myClient.mySub:global createDurableConsumer(myTopic, "mySub") will create myClient.mySub Essentially this is why we need to remove the :global part still in the shared part, otherwise this is breaking spec. The other option would be to add :global (or a rename of :global to :durable) to the durable consumer, but that would break things historically. As removing :global in shared wouldn't break anything already historically, as SharedDurable is not in a working state. this is why we do have to do this. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043579#comment-16043579 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1326 We should note, as per JMS Spec:http://docs.oracle.com/javaee/7/api/javax/jms/Session.html#unsubscribe-java.lang.String- " A shared durable subscription and an unshared durable subscription may not have the same name and client identifier (if set). If an unshared durable subscription already exists with the same name and client identifier (if set) then a JMSException is thrown. " This means the current behaviour in AMQP here is wrong, as shared and unshared with the same subscription name are not making the same queue as such above is invalid. e.g. if clientId = myClient; createSharedDurableConsumer(myTopic, "mySub") will create myClient.mySub:global createDurableConsumer(myTopic, "mySub") will create myClient.mySub Essentially we should look to remove the :global part still in the shared part, otherwise this is breaking spec. this also wouldn't break anything already historically, as SharedDurable is not in a working state. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043558#comment-16043558 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce closed the pull request at: https://github.com/apache/activemq-artemis/pull/1326 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043309#comment-16043309 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 I will most probably won't get the chance tonight to do the other bit, as I'm already beer in hand readying myself for a long weekend in the sun too :) If you could maybe tee up with @jbertram to look at that for me when i raise next week if you'll be away. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043294#comment-16043294 ] ASF GitHub Bot commented on ARTEMIS-1205: - GitHub user michaelandrepearce opened a pull request: https://github.com/apache/activemq-artemis/pull/1326 ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour reverting the queue alignment changes, between amqp and core, as discussed will move this to artemis client behind a property flag. keeping the client id change, that fixes amqp shared subscriber. You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaelandrepearce/activemq-artemis ARTEMIS-1205 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/1326.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1326 commit ea93f34d977a9400fb7f09ff11799489ed850547 Author: Michael Andre PearceDate: 2017-06-08T19:38:09Z ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour reverting the queue alignment changes, between amqp and core, as discussed will move this to artemis client behind a property flag. keeping the client id change, that fixes amqp shared subscriber. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043287#comment-16043287 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce closed the pull request at: https://github.com/apache/activemq-artemis/pull/1325 > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043286#comment-16043286 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 ``` For us the alignment is fairly critical, as we will have shared core and amqp env ``` Are you sure you need this in production? or that's a testcase only. anyways.. I"m out for 2 weeks starting tomorrow... I'm trying to get a shock treatment to get away from the iphone as much as I can. :) > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043282#comment-16043282 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Sure will do this. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043274#comment-16043274 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 as long as the default is the current one, and the flag only applies to the client.. than I'm fine... I would prefer leaving as is.. just one less moving part.. but if that's critical for you I'm fine.. as Long as it doesn't get too bloated in the code. (hard to figure out)... So, if you create a connection factory property.. it's probably ok.. defaulted to what there is now. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043261#comment-16043261 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 How does this sound to you clebert? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043258#comment-16043258 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 For us the alignment is fairly critical, as we will have shared core and amqp env > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043256#comment-16043256 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Ok what I propose is, we keep the changes that were in this pr that only affect shared subscribers (broken) and we rework the alignment of the escaped "." In the other to actually maybe in the Artemis client not to escape (but make it a feature flag change) Is this reasonable? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043253#comment-16043253 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Agreed the "." Second pr could > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043252#comment-16043252 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 How does it the alignment changes are in the block of code in the if(shared) section which only applies to shared subscribers the part in point that's broken > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043241#comment-16043241 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 @michaelandrepearce that was my impression as well.. but then @gemmellr told me that it was only the case of the clientID that was broken.. according fixing this would break everything else from the POV of compatibility. So, I"m trying to figure out what is the case now > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043220#comment-16043220 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Yes it was compleatly broken, that what I added the tests for. If you revert and took just the amqp tests I added you'll note they'd fail > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043195#comment-16043195 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 That is what I'm trying to access. If it's just one case broken I would fix only this case. But if it's completely broken then yes we use the opportunity to fix the whole thing. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043141#comment-16043141 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 But on fixing as we won't be breaking anything we are taking the opportunity to align > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043138#comment-16043138 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 As in it is not breaking anything > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043137#comment-16043137 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 But amqp jms shared consumer is functionally broken without this > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16043057#comment-16043057 ] Robbie Gemmell commented on ARTEMIS-1205: - I think we need to weigh the cross-protocol consistency against the issues created from changing the existing behaviour, so to follow the above with a more direct question.. Most of the changes here were made for consistency between protocols, rather than just to fix the specific bug initially identified on the AMQP side that lead to incorrect shared subs behaviour for the AMQP JMS behaviour when no ClientID was specified. Do you actually need such cross-protocol behaviour [~michael.andre.pearce], or was that change more for the sake of having them consistent? > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16042734#comment-16042734 ] Robbie Gemmell commented on ARTEMIS-1205: - I've been looking at the effect of the naming changes made here and the resultant new behaviour for \[JMS\] AMQP clients. The changes introduce various issues that did not previously exist, and so I think its worth considering whether it was actually the correct thing to do. Some issues: - Durable subscription backing queues for connections without a ClientID now share the same namespace as regular queue names, and things fail (in an not very helpful and/or somewhat incorrect fashion) when they do collide, when reasonably they should succeed. - Following from the above, durable subscription backing queues for subscriptions on connections without a ClientID can collide with durable subscription backing queue names for connections with ClientIDs. Its not clear the broker would notice. - Durable and non-durable subscription backing queue names can collide, either within a connection with a ClientID, across connections without a ClientID, or across those with ClientIDs and without ClientIDs. - Its unclear as yet if calling session#unsubscribe(subName) can delete the 'wrong thing' (i.e. a queue of the same name, rather than the subscription backing queue) when theres no ClientID as unsubscribe doesnt seem to work when the connection has no ClientID. I think its likely that the adressing changes in Artemis 2.0 may have contributed to some of the issues, as in 1.x the core 'JMS queue' and 'JMS topic' names were prefixed on the broker, preventing some of the collisions entirely and making others much more unlikely. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16042668#comment-16042668 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1325 On further testing we discovered that core escapes these, as such rather than changing core behaviour which has been working as such has active users, changed the AMQP behaviour, to match core. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16042661#comment-16042661 ] ASF GitHub Bot commented on ARTEMIS-1205: - GitHub user michaelandrepearce opened a pull request: https://github.com/apache/activemq-artemis/pull/1325 ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour. Fix that ActiveMQDestination escapes \\ and . with and \\. Update test case to test this and ensure regression doesn't occur. You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaelandrepearce/activemq-artemis ARTEMIS-1205 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/1325.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1325 commit 8f9fb3d82ae348f8b6e7f619a1523a60d3a077b2 Author: Michael Andre PearceDate: 2017-06-08T13:05:18Z ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour. Fix that ActiveMQDestination escapes \\ and . with and \\. Update test case to test this and ensure regression doesn't occur. > AMQP Shared Durable Subscriber incorrect behaviour. > --- > > Key: ARTEMIS-1205 > URL: https://issues.apache.org/jira/browse/ARTEMIS-1205 > Project: ActiveMQ Artemis > Issue Type: Bug >Affects Versions: 2.0.0, 2.1.0 >Reporter: Michael Andre Pearce >Assignee: Michael Andre Pearce >Priority: Blocker > Fix For: 2.2.0 > > Attachments: AMQPMissbehaviour.xlsx, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037655#comment-16037655 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 @clebertsuconic should be fixed now. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037612#comment-16037612 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 Normal failures... because of the queue names have changed. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037609#comment-16037609 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 This introduced a few failures on this test: org.apache.activemq.artemis.tests.integration.amqp.ClientDefinedMultiConsumerTest > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037097#comment-16037097 ] Michael Andre Pearce commented on ARTEMIS-1205: --- [~gemmellr] Glad we're agreed :) Re the one final comment. "I realise, I wasn't really commenting on that aspect...more that it looks (I might be mistaken, I haven't tried it) to also be the same namespace as regular (non 'topic subscription backing') queues which could give unexpected behaviour, e.g during unsubscribe is it possible Bad Things (TM) might happen to a queue named in line with an otherwise unrelated topic subscription?" All the same risks, as per the core client, this is the address and queue model implemented in core artemis, so if this is true, then there is a lot larger issues with the core underlying design (but I'm sure this was thought about when being implemented). [~tabish121] agreed, i think that issue is separate, we can track separately. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037091#comment-16037091 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on the issue: https://github.com/apache/activemq-artemis/pull/1316 @clebertsuconic def no worries, entirely makes sense. Was just updating to let you know everything is ready from my POV. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037080#comment-16037080 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1316#discussion_r120130864 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -738,17 +738,14 @@ private static String createQueueName(String clientId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; --- End diff -- And build is green :) > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037075#comment-16037075 ] Timothy Bish commented on ARTEMIS-1205: --- Given the Artemis client appears to be violating the JMS specification here I'd suggest opening a new issue to document it similar to ARTEMIS-702 > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037070#comment-16037070 ] Robbie Gemmell commented on ARTEMIS-1205: - {quote} So we saying Artemis client behaviour here is incorrect? {quote} I'm saying the Qpid client is behaving as expected, as is the brokers AMQP behaviour in this case. I'm not sure what the expectation is for the Artemis client. {quote} This moves it to the same name as artemis core does, so from a queue name space it will be the same, the bonus being it will mean actually can share a subscription safefly between a AMQP and Core client, this is included in the added integration tests. {quote} I realise, I wasn't really commenting on that aspect...more that it looks (I might be mistaken, I haven't tried it) to also be the same namespace as regular (non 'topic subscription backing') queues which could give unexpected behaviour, e.g during unsubscribe is it possible Bad Things (TM) might happen to a queue named in line with an otherwise unrelated topic subscription? {quote} The fact shared subscriber simply was not functional before when using AMQP there shouldn't be upgrade issue as feature simply wasn't working. {quote} Thats what I was saying? Other than during the first connection, where it would look to share as expected across multiple subscribers, the existing behaviour already resulted in similarly breaking name changes so theres no issue for upgraders in changing it. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037056#comment-16037056 ] Michael Andre Pearce commented on ARTEMIS-1205: --- If this is the case, once PR is merged, i think we can say the issue (shared consumer) is resolved and the other is working as expected. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037043#comment-16037043 ] Michael Andre Pearce commented on ARTEMIS-1205: --- Re "Its probably worth noting that changing the queue name in the manner from the PR looks like it moves the no-ClientID shared durable subscription backing queue names into the same namespace as regular queues, which might lead to unexpected behaviour at times. Seperately, the change in name doesnt itself pose any more of an issue (in terms of orphaned messages on old queues) for people upgrading than the existing behaviour already did that would give them a different queue name with each connection." This moves it to the same name as artemis core does, so from a queue name space it will be the same, the bonus being it will mean actually can share a subscription safefly between a AMQP and Core client, this is included in the added integration tests. The fact shared subscriber simply was not functional before when using AMQP there shouldn't be upgrade issue as feature simply wasn't working. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037034#comment-16037034 ] Michael Andre Pearce commented on ARTEMIS-1205: --- [~gemmellr] its the same naming semantic as the artemis core client makes. As such as noted in the test cases, whilst not only fixing the issue that simply shared consumer using AMQP on artemis didn't work as its meant to, it also makes it compatible with the artemis core client, as such you can share a subscription with amqp and core client. [~gemmellr] any idea whats occurring with the Durable (non-shared) case? essentially it seems the broker is not allowing the connection where a client id already exists where as artemis client, it seemingly allows. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037026#comment-16037026 ] Robbie Gemmell commented on ARTEMIS-1205: - >From what I can see in JMSDurableConsumerTest2.java, the Qpid JMS AMQP client >is correctly throwing an InvalidClientIDException (with text "Received error >from remote peer without description [condition = amqp:invalid-field]" given >the broker omitted a description in its error condiditon), due to the test >illegally trying to use two different Connections with the same ClientID >concurrently. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037025#comment-16037025 ] Michael Andre Pearce commented on ARTEMIS-1205: --- So it seems for the Durable Consumer (dot three), the issue is creating two connections from the same connection factory with the same clientId either by setting it on the connection, or by setting the client id in the connection factory. When checking on the broker side, In ExtCapability.java method needUniqueConnection returns true; public static boolean needUniqueConnection(Connection connection) { Symbol[] extCapabilities = connection.getRemoteDesiredCapabilities(); if (extCapabilities != null) { for (Symbol sym : extCapabilities) { if (sym.compareTo(AmqpSupport.SOLE_CONNECTION_CAPABILITY) == 0) { return true; } } } return false; } Any idea's whats occurring here? > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16037019#comment-16037019 ] Robbie Gemmell commented on ARTEMIS-1205: - Its probably worth noting that changing the queue name in the manner from the PR looks like it moves the no-ClientID shared durable subscription backing queue names into the same namespace as regular queues, which might lead to unexpected behaviour at times. Seperately, the change in name doesnt itself pose any more of an issue (in terms of orphaned messages on old queues) for people upgrading than the existing behaviour already did that would give them a different queue name with each connection. > 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, JMSDurableConsumerTest2.java, > JMSSharedDurableConsumerTest.java > > > 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)
[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=16036922#comment-16036922 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user michaelandrepearce commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1316#discussion_r120105956 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -738,17 +738,14 @@ private static String createQueueName(String clientId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; --- End diff -- wait one second I'm just sorting our SharedConsumer also :) , just pushing :) > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036913#comment-16036913 ] ASF GitHub Bot commented on ARTEMIS-1205: - Github user clebertsuconic commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/1316#discussion_r120104234 --- Diff: artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java --- @@ -738,17 +738,14 @@ private static String createQueueName(String clientId, boolean shared, boolean global, boolean isVolatile) { - String queue = clientId == null || clientId.isEmpty() ? pubId : clientId + "." + pubId; + String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; --- End diff -- ... I will run the testsuite and merge this > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036896#comment-16036896 ] Michael Andre Pearce commented on ARTEMIS-1205: --- [~gemmellr] I've raised a PR with that change, including adding the test case, that was broken, and subsequently now passes. > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036892#comment-16036892 ] ASF GitHub Bot commented on ARTEMIS-1205: - GitHub user michaelandrepearce opened a pull request: https://github.com/apache/activemq-artemis/pull/1316 ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour. Add test case, to prove the issue, and then obviously ensure it works, post fix. Apply changes in logic of createQueueName to handle global better and fix the behaviour. You can merge this pull request into a Git repository by running: $ git pull https://github.com/michaelandrepearce/activemq-artemis ARTEMIS-1205 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/activemq-artemis/pull/1316.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #1316 commit 9c04144beae9212826b86d519702f111a258dcbe Author: Michael Andre PearceDate: 2017-06-05T12:45:25Z ARTEMIS-1205: AMQP Shared Durable Subscriber incorrect behaviour. Add test case, to prove the issue, and then obviously ensure it works, post fix. Apply changes in logic of createQueueName to handle global better and fix the behaviour. > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036886#comment-16036886 ] Michael Andre Pearce commented on ARTEMIS-1205: --- So essentially, if global = true, ignore the client id that comes through, this to me makes sense, and also would sort these issues. Its a small change in createQueueName class. And seems to resolve both issues e.g. making the below now the logic, passes the tests :) private static String createQueueName(String clientId, String pubId, boolean shared, boolean global, boolean isVolatile) { String queue = clientId == null || clientId.isEmpty() || global ? pubId : clientId + "." + pubId; if (shared) { if (queue.contains("|")) { queue = queue.split("\\|")[0]; } if (isVolatile) { queue += ":shared-volatile"; } } return queue; } > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036864#comment-16036864 ] Robbie Gemmell commented on ARTEMIS-1205: - The container-id is used by the JMS client to carry ClientID. When a ClientID is not set explicitly, a container-id is generated (as all connections must have a container-id). When the connection has no ClientID, the client flags its shared subscription links as 'global', to indicate to the server that the subscription is not scoped to the container-id. So yes if its 'global', the container-id value should be ignored. The 'global' in the queue name is useful to ensure segregation of 'global' and 'not-global' subscriptions with the same subscription name, and also regular queues vs those backing 'global' subscriptions. It shouldnt really affect anything here, except perhaps cross-protocol access to the same 'JMS' subscription if other protocol heads dont do the same. > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036861#comment-16036861 ] Michael Andre Pearce commented on ARTEMIS-1205: --- Re client Id, It seems JmsConnectionFactory in QPID client is auto generating a clientID even if not set, thus causing this issue. if(userSpecifiedClientId) { connectionInfo.setClientId(this.clientID, true); } else { connectionInfo.setClientId(this.getClientIdGenerator().generateId(), false); } > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036855#comment-16036855 ] Michael Andre Pearce commented on ARTEMIS-1205: --- [~gemmellr] the shared durable subscriber, is the more critical one, thus why have gone the extra effort to write/migrate from our internals the integration test. yes it looks like container-id is being mixed with client id, as such broker side, its treating it as clientId (but where client id seems to be this container id) + subscriber name. when should just be (when client id is not set) subscriber name re the global, i think this can be removed on the broker side? > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036851#comment-16036851 ] Michael Andre Pearce commented on ARTEMIS-1205: --- Debugging through it seems: createQueueName in ProtonServerSenderContext is what generates the queue name used. during debugging it seems client id is set when the above method, even so it isn't set on the client. As such this is causing new queues to be created, with pre-fixed with values like: ID:53d2c9ed-28b7-4072-9759-2e2233fc223e:1 like wise it is here global is set (this could probably be removed) > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=16036643#comment-16036643 ] Michael Andre Pearce commented on ARTEMIS-1205: --- [~tabish121] You code is re Durable topic subscription, we are talking about Shared Durable topic subscription, we've added the integration case failing. > 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, JMSSharedDurableConsumerTest.java > > > 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)
[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=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 = 3) 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)