activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gemmellr <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1337: ARTEMIS-1205: AMQP Shared Durable Subsc...
Date Tue, 13 Jun 2017 17:33:15 GMT
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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message