-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(kafka): fix kafka timestamps sent from application #4709
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we consider adding an extension trait if we'll use Unix timestamps in milliseconds frequently?
trait OffsetDateTimeExt {
fn unix_timestamp_millis(self) -> i128;
}
impl OffsetDateTimeExt for time::OffsetDateTime {
fn unix_timestamp_millis(self) -> i128 {
self.unix_timestamp_nanos() / 1_000_000
}
}
This conversion to timestamp millis is specific to kafka and would be abstracted away soon.... |
557bcfa
4cf4fd7
to
02325ca
Compare
02325ca
to
457c6a4
Compare
Type of Change
Description
fixes #4706
Convert secs to millis when sending creation timestamp to kafka
Additional Changes
Motivation and Context
How did you test it?
Checklist
cargo +nightly fmt --all
cargo clippy