You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by jbertram <gi...@git.apache.org> on 2018/04/19 19:44:50 UTC

[GitHub] activemq-artemis pull request #2034: ARTEMIS-1818 re-create auto-created que...

GitHub user jbertram opened a pull request:

    https://github.com/apache/activemq-artemis/pull/2034

    ARTEMIS-1818 re-create auto-created queue on JMS reconnect

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jbertram/activemq-artemis ARTEMIS-1818

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/activemq-artemis/pull/2034.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2034
    
----
commit 94fc317081f3ac3a6f87d21e8f076be08e660aa7
Author: Justin Bertram <jb...@...>
Date:   2018-04-19T19:42:39Z

    ARTEMIS-1818 re-create auto-created queue on JMS reconnect

----


---

[GitHub] activemq-artemis issue #2034: ARTEMIS-1818 re-create auto-created queue on J...

Posted by Snurppa <gi...@git.apache.org>.
Github user Snurppa commented on the issue:

    https://github.com/apache/activemq-artemis/pull/2034
  
    Wow that was fast, big thanks @jbertram 👍


---

[GitHub] activemq-artemis pull request #2034: ARTEMIS-1818 re-create auto-created que...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/activemq-artemis/pull/2034


---

[GitHub] activemq-artemis pull request #2034: ARTEMIS-1818 re-create auto-created que...

Posted by michaelandrepearce <gi...@git.apache.org>.
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().


---

[GitHub] activemq-artemis pull request #2034: ARTEMIS-1818 re-create auto-created que...

Posted by jbertram <gi...@git.apache.org>.
Github user jbertram commented on a diff in the pull request:

    https://github.com/apache/activemq-artemis/pull/2034#discussion_r182924057
  
    --- 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 --
    
    Will do, @michaelandrepearce. That's a much more elegant solution.


---