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

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

gaohoward-3
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 <jbertram@...>
Date:   2018-04-19T19:42:39Z

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

----


---
Reply | Threaded
Open this post in threaded view
|

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

gaohoward-3
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 | Threaded
Open this post in threaded view
|

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

gaohoward-3
In reply to this post by gaohoward-3
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.


---
Reply | Threaded
Open this post in threaded view
|

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

gaohoward-3
In reply to this post by gaohoward-3
Github user Snurppa commented on the issue:

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


---
Reply | Threaded
Open this post in threaded view
|

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

gaohoward-3
In reply to this post by gaohoward-3
Github user asfgit closed the pull request at:

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


---