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 2021/07/28 08:26:45 UTC

[GitHub] [activemq-artemis] gtully commented on a change in pull request #3673: ARTEMIS-3223 - ensure distribution uses the address from the message,…

gtully commented on a change in pull request #3673:
URL: https://github.com/apache/activemq-artemis/pull/3673#discussion_r678086641



##########
File path: artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
##########
@@ -1289,29 +1289,13 @@ public MessageReference reload(final Message message, final Queue queue, final T
    public Pair<RoutingContext, Message> redistribute(final Message message,
                                                      final Queue originatingQueue,
                                                      final Transaction tx) throws Exception {
-      Bindings bindings = addressManager.getBindingsForRoutingAddress(originatingQueue.getAddress());
+      Bindings bindings = addressManager.getBindingsForRoutingAddress(SimpleString.toSimpleString(message.getAddress()));
 
       if (bindings != null && bindings.allowRedistribute()) {
          // We have to copy the message and store it separately, otherwise we may lose remote bindings in case of restart before the message
          // arrived the target node
          // as described on https://issues.jboss.org/browse/JBPAPP-6130
          Message copyRedistribute = message.copy(storageManager.generateID());
-         copyRedistribute.setAddress(originatingQueue.getAddress());
-
-         if (tx != null) {

Review comment:
       no. that is dead code.




-- 
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.

To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org

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