From 8b33c1c640b9132c7269c377d355221180444da0 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Thu, 15 May 2008 14:48:51 +0000 Subject: [PATCH] Fix for http://issues.apache.org/activemq/browse/AMQ-1661 git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@656688 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/ActiveMQSession.java | 2 ++ .../src/main/java/org/apache/activemq/command/Message.java | 5 +---- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java index 43bd94be6c..c58e3d4f9d 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSession.java @@ -1599,6 +1599,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber)); message.setJMSMessageID(msg.getMessageId().toString()); } + //clear the brokerPath in case we are re-sending this message + msg.setBrokerPath(null); msg.setJMSDestination(destination); msg.setJMSDeliveryMode(deliveryMode); diff --git a/activemq-core/src/main/java/org/apache/activemq/command/Message.java b/activemq-core/src/main/java/org/apache/activemq/command/Message.java index 536bab8c52..f05048594a 100755 --- a/activemq-core/src/main/java/org/apache/activemq/command/Message.java +++ b/activemq-core/src/main/java/org/apache/activemq/command/Message.java @@ -134,10 +134,7 @@ public abstract class Message extends BaseCommand implements MarshallAware, Mess copy.brokerInTime = brokerInTime; copy.brokerOutTime = brokerOutTime; copy.memoryUsage=this.memoryUsage; - // copying the broker path breaks networks - if a consumer re-uses a - // consumed - // message and forwards it on - // copy.brokerPath = brokerPath; + copy.brokerPath = brokerPath; // lets not copy the following fields // copy.targetConsumerId = targetConsumerId;