gnodet-bot commented on code in PR #31217:
URL: https://github.com/apache/camel/pull/31217#discussion_r4762218007


##########
components/camel-azure/camel-azure-storage-blob/src/main/java/org/apache/camel/component/azure/storage/blob/BlobConstants.java:
##########
@@ -43,6 +44,11 @@ public final class BlobConstants {
     @Metadata(label = "consumer", description = "Datetime when the blob was 
last modified.",
               javaType = "java.time.OffsetDateTime")
     public static final String LAST_MODIFIED = HEADER_PREFIX + "LastModified";
+    @Metadata(label = "consumer",
+              description = "The time the blob was last modified, in 
milliseconds since the epoch, truncated to whole seconds."
+                            + " Set together with 
CamelAzureStorageBlobLastModified.",
+              javaType = "long")
+    public static final String MESSAGE_TIMESTAMP = Exchange.MESSAGE_TIMESTAMP;

Review Comment:
   ⚠️ **Description is misleading about the unit.** `javaType = "long"` with 
`Exchange.MESSAGE_TIMESTAMP` semantics means milliseconds since epoch. The 
description says "truncated to whole seconds" — but the value is computed in 
`BlobExchangeHeaders.lastModified()` as `offsetDateTime.toEpochSecond() * 
1000`, which yields **milliseconds** (second-resolution, but still 
milliseconds). "Truncated to whole seconds" suggests the value is in seconds, 
which is wrong.
   
   The same imprecision appears in `DataLakeConstants.MESSAGE_TIMESTAMP` and 
`QueueConstants.MESSAGE_TIMESTAMP`.
   
   ```suggestion
       @Metadata(label = "consumer",
                 description = "The time the blob was last modified, in 
milliseconds since the epoch, with second"
                               + " precision. Set together with 
CamelAzureStorageBlobLastModified.",
                 javaType = "long")
       public static final String MESSAGE_TIMESTAMP = 
Exchange.MESSAGE_TIMESTAMP;
   ```



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