activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [02/33] activemq-artemis git commit: ARTEMIS-1875 Add message address if not set during redistribution
Date Thu, 24 May 2018 20:29:17 GMT
ARTEMIS-1875 Add message address if not set during redistribution


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/4b04b53b
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/4b04b53b
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/4b04b53b

Branch: refs/heads/2.6.x
Commit: 4b04b53bc9b34e622329e890e4b4613cbc385498
Parents: 07197b8
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Mon May 21 18:21:26 2018 +0100
Committer: Martyn Taylor <mtaylor@redhat.com>
Committed: Mon May 21 18:23:42 2018 +0100

----------------------------------------------------------------------
 .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java   | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/4b04b53b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index f1f7a38..b722532 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -970,7 +970,6 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
    public Pair<RoutingContext, Message> redistribute(final Message message,
                                                      final Queue originatingQueue,
                                                      final Transaction tx) throws Exception
{
-
       Bindings bindings = addressManager.getBindingsForRoutingAddress(originatingQueue.getAddress());
 
       if (bindings != null && bindings.allowRedistribute()) {
@@ -978,6 +977,10 @@ public class PostOfficeImpl implements PostOffice, NotificationListener,
Binding
          // arrived the target node
          // as described on https://issues.jboss.org/browse/JBPAPP-6130
          Message copyRedistribute = message.copy(storageManager.generateID());
+         if (copyRedistribute.getAddress() == null) {
+            copyRedistribute.setAddress(originatingQueue.getAddress());
+         }
+
          if (tx != null) {
             tx.addOperation(new TransactionOperationAbstract() {
                @Override


Mime
View raw message