activemq-dev mailing list archives

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


---
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