activemq-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ARTEMIS-1205) AMQP Shared Durable Subscriber incorrect behaviour.
Date Tue, 13 Jun 2017 20:07:00 GMT

    [ https://issues.apache.org/jira/browse/ARTEMIS-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=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)

Mime
View raw message