Claus Ibsen created CAMEL-28016:
-----------------------------------

             Summary: camel-pubnub - CamelMessageTimestamp holds the timetoken, 
not milliseconds
                 Key: CAMEL-28016
                 URL: https://issues.apache.org/jira/browse/CAMEL-28016
             Project: Camel
          Issue Type: Bug
          Components: camel-pubnub
            Reporter: Claus Ibsen
             Fix For: 4.25.0


PubNubConsumer sets Exchange.MESSAGE_TIMESTAMP (CamelMessageTimestamp) to 
message.getTimetoken() and presence.getTimetoken(). A PubNub timetoken is a 
17-digit number in units of 100 nanoseconds since the epoch, while 
CamelMessageTimestamp is milliseconds since the epoch elsewhere in Camel (jms, 
kafka, file, ...). A route or a type converter that turns the header into a 
date gets a time far in the future.

Fix: set CamelMessageTimestamp to timetoken / 10_000 (the timetoken itself 
stays in CamelPubNubTimeToken), and note the change in the upgrade guide.

Found while declaring the message headers of the components (CAMEL-27980).

----
_Filed by Claude Code on behalf of davsclaus_



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to