mirror of https://github.com/apache/activemq.git
resolve: https://issues.apache.org/jira/browse/AMQ-2963 - revert setting destination on message: https://issues.apache.org/jira/browse/AMQ-2029, just set on transformed copy as format is provider dependent
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1055021 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
72cd4ec09e
commit
715bf260f4
|
@ -1701,8 +1701,7 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
TransactionId txid = transactionContext.getTransactionId();
|
||||
long sequenceNumber = producer.getMessageSequence();
|
||||
|
||||
//Set the "JMS" header fields on the orriginal message, see 1.1 spec section 3.4.11
|
||||
message.setJMSDestination(destination);
|
||||
//Set the "JMS" header fields on the original message, see 1.1 spec section 3.4.11
|
||||
message.setJMSDeliveryMode(deliveryMode);
|
||||
long expiration = 0L;
|
||||
if (!producer.getDisableMessageTimestamp()) {
|
||||
|
@ -1728,7 +1727,8 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
|
|||
}
|
||||
//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()) {
|
||||
|
|
|
@ -47,12 +47,12 @@ import org.apache.activemq.command.ActiveMQDestination;
|
|||
public class JMSMessageTest extends JmsTestSupport {
|
||||
|
||||
public ActiveMQDestination destination;
|
||||
public int deliveryMode;
|
||||
public int deliveryMode = DeliveryMode.NON_PERSISTENT;
|
||||
public int prefetch;
|
||||
public int ackMode;
|
||||
public byte destinationType;
|
||||
public byte destinationType = ActiveMQDestination.QUEUE_TYPE;
|
||||
public boolean durableConsumer;
|
||||
public String connectURL;
|
||||
public String connectURL = "vm://localhost?marshal=false";
|
||||
|
||||
/**
|
||||
* Run all these tests in both marshaling and non-marshaling mode.
|
||||
|
@ -474,7 +474,9 @@ public class JMSMessageTest extends JmsTestSupport {
|
|||
//validate jms spec 1.1 section 3.4.11 table 3.1
|
||||
// JMSDestination, JMSDeliveryMode, JMSExpiration, JMSPriority, JMSMessageID, and JMSTimestamp
|
||||
//must be set by sending a message.
|
||||
assertEquals(destination, message.getJMSDestination());
|
||||
|
||||
// exception for jms destination as the format is provider defined so it is only set on the copy
|
||||
assertNull(message.getJMSDestination());
|
||||
assertEquals(Session.AUTO_ACKNOWLEDGE, message.getJMSDeliveryMode());
|
||||
assertTrue(start + timeToLive <= message.getJMSExpiration());
|
||||
assertTrue(end + timeToLive >= message.getJMSExpiration());
|
||||
|
|
Loading…
Reference in New Issue