activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtaylor <...@git.apache.org>
Subject [GitHub] activemq-artemis pull request #1830: ARTEMIS-1644 legacy clients can't acces...
Date Wed, 31 Jan 2018 14:39:06 GMT
Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1830#discussion_r165070460
  
    --- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/QueueAbstractPacket.java
---
    @@ -69,30 +49,29 @@ public SimpleString getAddress(int clientVersion) {
         */
        public final List<SimpleString> convertQueueNames(int clientVersion, List<SimpleString>
queueNames) {
           if (clientVersion < ADDRESSING_CHANGE_VERSION) {
    -         return applyAddressPrefixTo(queueNames);
    -      } else {
    -         return queueNames;
    -      }
    -   }
    -
    -   private List<SimpleString> applyAddressPrefixTo(List<SimpleString> queueNames)
{
    -      final int names = queueNames.size();
    -      if (names == 0) {
    -         return Collections.emptyList();
    -      } else {
    -         final SimpleString address = this.address;
    -         final SimpleString prefix = jmsPrefixOf(address);
    -         if (prefix != null) {
    -            final List<SimpleString> prefixedQueueNames = new ArrayList<>(names);
    -            for (int i = 0; i < names; i++) {
    -               final SimpleString oldQueueNames = queueNames.get(i);
    -               final SimpleString prefixedQueueName = prefix.concat(oldQueueNames);
    -               prefixedQueueNames.add(prefixedQueueName);
    -            }
    -            return prefixedQueueNames;
    +         final int names = queueNames.size();
    --- End diff --
    
    @jbertram I am confused by this.  Why are you still checking for Client Verison < ADDRESSING_CHANGE_VERSION?
 
    
    The point of the JIRA is to allow old clients to continue using the old address space.
 So, I should be able to configure a queue called "jms.queue.foo" and have the old client
connect to it.   It should not matter what client or protocol you are using.  For this reason,
we do not want to strip any prefix in the default case.  I.e. there is no prefix set on the
acceptor (regardless of the client version).
    
    We only need to configure an acceptor when using the old client and the new address model.
 In that case, you only need to check to see if there's a prefix enabled, not the client version.
 This is a generic feature across all protocols.  
    
    The key thing is to allow the old client to continue using the old address space.  By
using the generic feature.


---

Mime
View raw message