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 issue #1775: ARTEMIS-1587 Add setting to control the queue ...
Date Sun, 14 Jan 2018 23:00:23 GMT
Github user michaelandrepearce commented on the issue:

    https://github.com/apache/activemq-artemis/pull/1775
  
    @jostbg there is implications especially for JMS users, basically if a client requests
a shared subscription, it should not marry up to a durable shared subscription or vice versa.

    
    "There is no restriction on durable subscriptions and shared non-durable subscriptions
having the same name and clientId (which may be unset). Such subscriptions would be completely
separate."  
    
    to avoid this due a prefix on the queue to separate the two, so on core this is prefixed
"non-durable", see code here
    
    ```
       public static SimpleString createQueueNameForSubscription(final boolean isDurable,
                                                           final String clientID,
                                                           final String subscriptionName)
{
          final String queueName;
          if (clientID != null) {
             if (isDurable) {
                queueName = ActiveMQDestination.escape(clientID) + SEPARATOR +
                   ActiveMQDestination.escape(subscriptionName);
             } else {
                queueName = "nonDurable" + SEPARATOR +
                   ActiveMQDestination.escape(clientID) + SEPARATOR +
                   ActiveMQDestination.escape(subscriptionName);
             }
          } else {
             if (isDurable) {
                queueName = ActiveMQDestination.escape(subscriptionName);
             } else {
                queueName = "nonDurable" + SEPARATOR +
                   ActiveMQDestination.escape(subscriptionName);
             }
          }
          return SimpleString.toSimpleString(queueName);
       }
    
    ```


---

Mime
View raw message