You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by GitBox <gi...@apache.org> on 2020/06/16 02:10:40 UTC

[GitHub] [activemq-artemis] qihongxu opened a new pull request #3185: ARTEMIS-2806 deployQueue missing address argument

qihongxu opened a new pull request #3185:
URL: https://github.com/apache/activemq-artemis/pull/3185


   In ActiveMQServerControlImpl, deployQueue method is missing address argument which results in creating non-matched addresses and queues. (For example, using deployQueue to create a subscriber A_0 under existing address A, it finally returns a new topic A_0 with a subscriber A_0 )


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq-artemis] jbertram commented on a change in pull request #3185: ARTEMIS-2806 deployQueue missing address argument

Posted by GitBox <gi...@apache.org>.
jbertram commented on a change in pull request #3185:
URL: https://github.com/apache/activemq-artemis/pull/3185#discussion_r440552355



##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
##########
@@ -952,6 +952,7 @@ public void deployQueue(final String address,
       clearIO();
       try {
          server.createQueue(new QueueConfiguration(name)
+                            .setAddress(address)
                             .setName(name)

Review comment:
       You can actually remove `setName(name)` as this is already taken care of by passing `name` to the constructor. The bug here is that `setName(name)` is actually called instead of `setAddress(address)`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq-artemis] asfgit closed pull request #3185: ARTEMIS-2806 deployQueue missing address argument

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #3185:
URL: https://github.com/apache/activemq-artemis/pull/3185


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq-artemis] qihongxu commented on pull request #3185: ARTEMIS-2806 deployQueue missing address argument

Posted by GitBox <gi...@apache.org>.
qihongxu commented on pull request #3185:
URL: https://github.com/apache/activemq-artemis/pull/3185#issuecomment-644571568


   > We certainly want to fix this bug, but it's worth noting that all versions of `deployQueue` are deprecated so I recommend you migrate to `createQueue` as soon as possible. Furthermore, there are no actual tests for `deployQueue` which is almost certainly why this bug was not caught.
   
   Thanks for your advice! This bug is caught coincidently when we tried to upgrade some artemis servers to newer version. Although deployQueue is deprecated, I checked the commit log and found it was modified 2 months ago. We will migrate to createQueue in our projects. This pr is just for someone that might still use legacy methods as we do. :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [activemq-artemis] jbertram commented on pull request #3185: ARTEMIS-2806 deployQueue missing address argument

Posted by GitBox <gi...@apache.org>.
jbertram commented on pull request #3185:
URL: https://github.com/apache/activemq-artemis/pull/3185#issuecomment-644495829


   We certainly want to fix this bug, but it's worth noting that all versions of `deployQueue` are deprecated so I recommend you migrate to `createQueue` as soon as possible. Furthermore, there are no actual tests for `deployQueue` which is almost certainly why this bug was not caught.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org