[ 
https://issues.apache.org/jira/browse/AMQ-8322?focusedWorklogId=730893&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-730893
 ]

ASF GitHub Bot logged work on AMQ-8322:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Feb/22 13:27
            Start Date: 22/Feb/22 13:27
    Worklog Time Spent: 10m 
      Work Description: gemmellr commented on a change in pull request #729:
URL: https://github.com/apache/activemq/pull/729#discussion_r811943438



##########
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:
       Not much. You already have to check that it is a foreign message, and 
are already going to the expense of converting it, this cost need only apply in 
those cases. Relative to e.g the round trip to the broker for any reliable 
messaging operation the cost is likely not that significant. If you think 
barffing and throwing an exception is better, I would disagree.
   
   The consumer bit has to happen either way. It can synthesize the value from 
the timestamp (if present) if it doesnt have a specific differnet 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: gitbox-unsubscr...@activemq.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 730893)
    Time Spent: 6h 40m  (was: 6.5h)

> Implement JMS 2.0 Connection createContext methods
> --------------------------------------------------
>
>                 Key: AMQ-8322
>                 URL: https://issues.apache.org/jira/browse/AMQ-8322
>             Project: ActiveMQ
>          Issue Type: New Feature
>            Reporter: Matt Pavlovich
>            Assignee: Matt Pavlovich
>            Priority: Major
>              Labels: #jms2
>             Fix For: 5.17.0
>
>          Time Spent: 6h 40m
>  Remaining Estimate: 0h
>
> Add support for JMSContext, JMSProducer and JMSConsumer for working with 
> queues



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to