From commits-return-51572-archive-asf-public=cust-asf.ponee.io@activemq.apache.org Thu May 24 22:29:18 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 081AE18067A for ; Thu, 24 May 2018 22:29:17 +0200 (CEST) Received: (qmail 94934 invoked by uid 500); 24 May 2018 20:29:17 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 94901 invoked by uid 99); 24 May 2018 20:29:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 May 2018 20:29:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9B873E0D54; Thu, 24 May 2018 20:29:16 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: clebertsuconic@apache.org To: commits@activemq.apache.org Date: Thu, 24 May 2018 20:29:17 -0000 Message-Id: <87a76bda243a4d538e173bebe60e8977@git.apache.org> In-Reply-To: <263fa10ee03141b9900dfc3844dbd93d@git.apache.org> References: <263fa10ee03141b9900dfc3844dbd93d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [02/33] activemq-artemis git commit: ARTEMIS-1875 Add message address if not set during redistribution 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 Authored: Mon May 21 18:21:26 2018 +0100 Committer: Martyn Taylor 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 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