-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
default partition offset = 0 breaks when first log segment is rolled #175
Comments
I wonder how you'd go about writing a test for that. A unit test may be as good as we get on that one. But yeah, I totally agree. Arguably, the right answer is actually to start reading from the tail of the topic instead of the head. |
I think I just ran into this, in a bad way. I have a Of course, I'm getting |
leporid -- workaround is to use |
Thanks for the hint. I considered that, but, sensibly, My solution was this: At line 118 in
Does this make sense? |
My private monkey patch disappeared when I upgraded to 0.9.2, and this is still open. May I attempt to fix this and generate a PR? (Solution quite similar to above, but also noticed that |
Fixed in #296 by reseting partition offsets on offset out of range errors |
…not installed (dpkp#175) Closes wbarnha#174.
…not installed (dpkp#175) Closes wbarnha#174.
When not using auto-commit, the consumer object will set the default offset to 0 for all partitions:
https://github.com/mumrah/kafka-python/blob/master/kafka/consumer.py#L119
This is an absolute offset and will only work so long as the first message is still in an active log segment. As soon as it gets rolled by the server, the default consumer will no longer be able to fetch messages without a manual seek.
I think we should probably query the server for the smallest valid offset rather than assuming offset 0 is still there.
The text was updated successfully, but these errors were encountered: