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
This commit is contained in:
Hiram R. Chirino 2012-12-12 16:48:14 +00:00
parent aaead5be21
commit 044e6bf18a
1 changed files with 3 additions and 3 deletions

View File

@ -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()) {