-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Manual Consumer Offset Management #4
Comments
The two options from an API perspective seem to be:
I don't have an opinion on which is better. |
The problem with whatever we do is that it's API which has to change once #2 is done, and API changes are basically verboten in go. |
That said, 1) seems saner to me. |
Actually, we can add a "startingOffset int64" to NewConsumer, then when #2 is done we can define FetchFromBroker as -1. That won't break compatibility. |
Although idiomatically the startingOffset should be in a ConsumerOptions struct similar to the Config struct at http://godoc.org/github.com/ActiveState/tail - this lets us add more options in the future without breaking API compat, since unspecified fields in a struct are safely nil/0 by default |
Pending issue #2, there is no way for the consumer to manually specify which offset to start at - it's always 0. There should be a way to tell the consumer to start at a specific offset.
The text was updated successfully, but these errors were encountered: