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 // transform to our own message format here
ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message, connection); ActiveMQMessage msg = ActiveMQMessageTransformation.transformMessage(message, connection);
msg.setDestination(destination);
// Set the message id. // Set the message id.
if (msg == message) { if (msg == message) {
msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber)); msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber));
} else { } else {
msg.setMessageId(new MessageId(producer.getProducerInfo().getProducerId(), sequenceNumber)); 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 //clear the brokerPath in case we are re-sending this message
msg.setBrokerPath(null); msg.setBrokerPath(null);
// destination format is provider specific so only set on transformed message
msg.setJMSDestination(destination);
msg.setTransactionId(txid); msg.setTransactionId(txid);
if (connection.isCopyMessageOnSend()) { if (connection.isCopyMessageOnSend()) {