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

ASF GitHub Bot logged work on ARTEMIS-2919:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 01/Dec/20 14:36
            Start Date: 01/Dec/20 14:36
    Worklog Time Spent: 10m 
      Work Description: jbertram commented on a change in pull request #3279:
URL: https://github.com/apache/activemq-artemis/pull/3279#discussion_r533454128



##########
File path: 
artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
##########
@@ -636,6 +641,19 @@ default Object getBrokerProperty(SimpleString key) {
       return getObjectProperty(key);
    }
 
+   default Message setIngressTimestamp() {
+      setBrokerProperty(HDR_INGRESS_TIMESTAMP, System.currentTimeMillis());
+      return this;
+   }
+
+   default Long getIngressTimestamp() {
+      Object result = getBrokerProperty(HDR_INGRESS_TIMESTAMP);
+      if (result == null) {
+         return null;
+      }

Review comment:
       For some reason I had in my head that trying to cast a `null` would 
throw a `NullPointerException`. Will fix.

##########
File path: 
artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java
##########
@@ -1339,6 +1339,21 @@ public Object getBrokerProperty(SimpleString key) {
       return extra.getProperty(key);
    }
 
+   @Override
+   public final org.apache.activemq.artemis.api.core.Message 
setIngressTimestamp() {
+      setMessageAnnotation(AMQPMessageSupport.INGRESS_TIMESTAMP, 
System.currentTimeMillis());
+      return this;
+   }
+
+   @Override
+   public Long getIngressTimestamp() {
+      Object result = 
getMessageAnnotation(AMQPMessageSupport.INGRESS_TIMESTAMP);
+      if (result == null) {
+         return null;
+      }

Review comment:
       For some reason I had in my head that trying to cast a `null` would 
throw a `NullPointerException`. Will fix.




----------------------------------------------------------------
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.

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


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

    Worklog Id:     (was: 518452)
    Time Spent: 3h  (was: 2h 50m)

> Support timestamping incoming messages
> --------------------------------------
>
>                 Key: ARTEMIS-2919
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-2919
>             Project: ActiveMQ Artemis
>          Issue Type: New Feature
>            Reporter: Justin Bertram
>            Assignee: Justin Bertram
>            Priority: Major
>          Time Spent: 3h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to