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

    https://github.com/apache/activemq-artemis/pull/2034#discussion_r182906602
  
    --- Diff: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ActiveMQSessionContext.java
 ---
    @@ -772,6 +772,10 @@ public void 
recreateConsumerOnServer(ClientConsumerInternal consumerInternal,
           if (!queueInfo.isDurable()) {
              CreateQueueMessage_V2 createQueueRequest = new 
CreateQueueMessage_V2(queueInfo.getAddress(), queueInfo.getName(), 
queueInfo.getRoutingType(), queueInfo.getFilterString(), false, 
queueInfo.isTemporary(), queueInfo.getMaxConsumers(), 
queueInfo.isPurgeOnNoConsumers(), queueInfo.isAutoCreated(), false, 
queueInfo.isExclusive(), queueInfo.isLastValue());
     
    +         sendPacketWithoutLock(sessionChannel, createQueueRequest);
    +      } else if (queueInfo.isAutoCreated()) {
    --- End diff --
    
    seems almost duplicated code lines.
    
    why not make the if statement of the if above (!queueInfo.isDurable() || 
queueInfo.isAutoCreated()) 
    and replace the only difference which is the hardcoded false for durability 
to take queueInfo.isDurable().


---

Reply via email to