Github user mtaylor commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/1759#discussion_r162047648
  
    --- Diff: 
artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQSession.java
 ---
    @@ -194,7 +195,14 @@ private boolean checkAutoCreateQueue(SimpleString 
queueName, boolean isTemporary
              try {
                 if (!queueBinding.isExists()) {
                    if (bindingQuery.isAutoCreateQueues()) {
    -                  server.createQueue(queueName, RoutingType.ANYCAST, 
queueName, null, true, isTemporary);
    +                  SimpleString queueNameToUse = queueName;
    +                  SimpleString addressToUse = queueName;
    +                  if 
(CompositeAddress.isFullyQualified(queueName.toString())) {
    +                     CompositeAddress compositeAddress = 
CompositeAddress.getQueueName(queueName.toString());
    +                     addressToUse = new 
SimpleString(compositeAddress.getAddress());
    +                     queueNameToUse = new 
SimpleString(compositeAddress.getQueueName());
    +                  }
    --- End diff --
    
    @gtully This looks good, except you also need to check that the address 
exists and if auto-create addresses is switched on.  You can get this 
information from the bindings query.  


---

Reply via email to