gemmellr commented on a change in pull request #729:
URL: https://github.com/apache/activemq/pull/729#discussion_r812041572



##########
File path: 
activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
##########
@@ -1956,12 +1978,17 @@ protected void send(ActiveMQMessageProducer producer, 
ActiveMQDestination destin
             //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()) {
-                long timeStamp = System.currentTimeMillis();
+            long timeStamp = System.currentTimeMillis();
+            if (timeToLive > 0) {
+                expiration = timeToLive + timeStamp;
+            }
+
+            // TODO: AMQ-8500 - update this when openwire supports 
JMSDeliveryTime
+            message.setJMSDeliveryTime(timeStamp);

Review comment:
       I could go other way on that one. Both are about as non-meaningful as 
each other, as they will be in the past from the recievers perspective. 0 is 
like the 'defaullt', ala expiration etc. Tbh I'm not sure I actually know of a 
reason to look at the value after receiving a message, except as part of an 
implementation test hehe.
   
   I think from your 'getFromMessageDeliveryTime(Message fromMessage)' 
inclusion you mean during the send though. In that case, strictly speaking I 
guess you dont necessarily need to get the value as you are about to _set_ the 
value.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to