Skip to content
This repository has been archived by the owner on Nov 27, 2023. It is now read-only.

Change unix precision to seconds for timestamp property #247

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sakshamgupta05
Copy link

@sakshamgupta05 sakshamgupta05 commented Jul 9, 2021

The timestamp property in AMQP 0-9-1 is defined as a 64bit Unix timestamp, which is seconds since 1970/1/1
For reference -> rabbitmq/rabbitmq-message-timestamp#16 (comment)

This causes issues while reading in some of the client libraries which assume that the value is in seconds & parses this value incorrectly
Example, java client library -> https://github.com/rabbitmq/rabbitmq-java-client/blob/23e7ba0e96d383c80f8da2fb23786a1111854f9a/src/main/java/com/rabbitmq/client/impl/ValueReader.java#L266

The timestamp property in AMQP 0-9-1 is defined as a 64bit Unix timestamp, which is seconds since 1970/1/1
For reference -> rabbitmq/rabbitmq-message-timestamp#16 (comment)

This causes issues while reading in some of the client libraries which assume that the value is in seconds & parses this value incorrectly
Example, java client library -> https://github.com/rabbitmq/rabbitmq-java-client/blob/23e7ba0e96d383c80f8da2fb23786a1111854f9a/src/main/java/com/rabbitmq/client/impl/ValueReader.java#L266
@dch
Copy link
Contributor

dch commented Sep 20, 2021

LGTM, but maybe needs to wait for a major version bump as it's clearly going to be a Breaking Change. Although I expect many people are not running into this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants