mattrpav commented on a change in pull request #729:
URL: https://github.com/apache/activemq/pull/729#discussion_r811888178
##########
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'm not following you on what the recommended approach here is. You
mentioned before that the field is required and should be hydrated with the
timestamp value.
- ActiveMQ producer message (and foreign v2) needs value for client after
message has been processed through the producer
- ActiveMQ consumer message (and foreign v2) needs value for client after
message has been received
To handle a v1 message we'd have to add reflection here and check existence
of the field before assignment. That sounds very expensive for every message
operation. It would not be safe to cache any of the reflection objects.
What am I missing?
--
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]