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

Add support for reseting offsets to a specific timestamp #136

Closed
danmarcab opened this issue Mar 6, 2024 · 1 comment · Fixed by #137
Closed

Add support for reseting offsets to a specific timestamp #136

danmarcab opened this issue Mar 6, 2024 · 1 comment · Fixed by #137

Comments

@danmarcab
Copy link
Contributor

👋

We have a use case where we need to consume from a topic, but neither consuming from the start or the end is acceptable.
We'd like to start consuming, let's say, the last day worth of messages.

One way this could work is allowing {:timestamp, timestamp} to be a value for the offset_reset_policy option. timestamp could be a timestamp. :brod can use that timestamp to resolve the offsets. This timestamp would be fixed so maybe even better if we could pass a function that returns a timestamp.

I have a working branch and will open a draft PR so the amount of changes needed can be evaluated, but I am mainly looking to see if this is something that would be accepted.

As always, thanks for the amazing library 🙇

@slashmili
Copy link
Collaborator

Seems like a good addition specially if it's already in brod!

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

Successfully merging a pull request may close this issue.

2 participants