Skip to content
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

Timestamp type clarification in ConsumerRecord #955

Open
fd8s0 opened this issue Apr 22, 2022 · 2 comments
Open

Timestamp type clarification in ConsumerRecord #955

fd8s0 opened this issue Apr 22, 2022 · 2 comments
Labels
enhancement New feature or request
Milestone

Comments

@fd8s0
Copy link

fd8s0 commented Apr 22, 2022

I was hoping it was clearer to me why the Timestamp was chosen to be represented the way it is.

I find myself having to write this sort of thing

ts.logAppendTime
    .orElse(ts.createTime)
    .orElse(ts.unknownTime)

Trying to disassemble it every time to basically undo what's been done in the fromJava method, is there some philosophy here that I'm missing? If I want to know the type of the timestamp I'm also supposed to do call for the option of each one in succession to try infer the type?
I'd have expected an optional timestamp with the type attached, I propose that maybe it can be re-thought, or perhaps get some peace of mind on what's the reasoning behind this.

@bplommer
Copy link
Member

I was also wondering about that - I was thinking about changing it in 3.0. Any thoughts on this @vlovgr ?

@vlovgr
Copy link
Contributor

vlovgr commented Apr 26, 2022

I agree we should change it. 👍

@bplommer bplommer added this to the v3.0.0 milestone May 9, 2022
@bplommer bplommer added the enhancement New feature or request label May 9, 2022
@aartigao aartigao modified the milestones: v3.0.0, v4.0.0 Oct 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

4 participants