From 044e6bf18affb69fb79e565af945940bd29b62a7 Mon Sep 17 00:00:00 2001 From: "Hiram R. Chirino" Date: Wed, 12 Dec 2012 16:48:14 +0000 Subject: [PATCH] Make sure the JMSDestination is even on foreign messages. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1420821 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/java/org/apache/activemq/ActiveMQSession.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java index 8d733c42ed..878a0d5ad7 100755 --- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java +++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java @@ -1756,18 +1756,18 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta // transform to our own message format here ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message, connection); + msg.setDestination(destination); // Set the message id. if (msg == message) { msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber)); } else { msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber)); - message.setJMSMessageID(msg.getMessageId().toString()); + // Make sure the JMS destination is set on the foreign messages too. + message.setJMSDestination(destination); } //clear the brokerPath in case we are re-sending this message msg.setBrokerPath(null); - // destination format is provider specific so only set on transformed message - msg.setJMSDestination(destination); msg.setTransactionId(txid); if (connection.isCopyMessageOnSend()) {