This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
commit f01afa342064f2f37af7253247d72637beb70e06 Author: Claus Ibsen <[email protected]> AuthorDate: Tue Jun 8 12:09:59 2021 +0200 CAMEL-16627: camel-core - Add common header for source timestamp --- core/camel-api/src/main/java/org/apache/camel/Exchange.java | 2 ++ core/camel-api/src/main/java/org/apache/camel/Message.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/core/camel-api/src/main/java/org/apache/camel/Exchange.java b/core/camel-api/src/main/java/org/apache/camel/Exchange.java index 2b9c237..e75d853 100644 --- a/core/camel-api/src/main/java/org/apache/camel/Exchange.java +++ b/core/camel-api/src/main/java/org/apache/camel/Exchange.java @@ -669,6 +669,8 @@ public interface Exchange { /** * Gets the timestamp in millis when this exchange was created. + * + * @see Message#getMessageTimestamp() */ long getCreated(); diff --git a/core/camel-api/src/main/java/org/apache/camel/Message.java b/core/camel-api/src/main/java/org/apache/camel/Message.java index 53407e2..0164405 100644 --- a/core/camel-api/src/main/java/org/apache/camel/Message.java +++ b/core/camel-api/src/main/java/org/apache/camel/Message.java @@ -57,8 +57,13 @@ public interface Message { * <p/> * Some systems like JMS, Kafka, AWS have a timestamp on the event/message, that Camel received. This method returns * the timestamp, if a timestamp exists. + * <p/> + * The message timestamp and exchange created are not the same. An exchange always have a created timestamp which is the + * local timestamp when Camel created the exchange. The message timestamp is only available in some Camel components + * when the consumer is able to extract the timestamp from the source event. * * @return the timestamp, or <tt>0</tt> if the message has no source timestamp. + * @see Exchange#getCreated() */ long getMessageTimestamp();
