-
Notifications
You must be signed in to change notification settings - Fork 1.4k
After pausing and resuming partition, the offset is reset far ahead. #2011
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
Comments
If I add something like this after resume():
then everything works as expected. Even though seek() to the result of position() as I understand should be a no-op semantically? |
Same problem for me. I'm going to use the hack with seek |
Same issue here, seek works for me as well. |
The same for me. The fix above works as well. |
Same for me, and the workaround works. Thanks @smalyshev This bug is nasty since some users may not even notice it as it silently corrupts the returned message stream. |
Seeing this issue as well, and am using the same seek method to workaround this issue. |
Same workaround worked for me. Thanks @smalyshev |
Still seeing this bug, and the same workaround works. |
If I use code that pauses and then resumes reading from partitions, the offset for the partition is set not to the last message read, but to the message far ahead. Example code:
This code will read 10 messages from each partition on the topic, and then pause it. After all partitions but one were treated this way, it will pause last partition and resume all the rest. One would expect that the next read resumes from offset 10 in one of the partitions. But this is not what happens, the real result looks something like:
And if we look at the debug message, there's this:
and so on fo the rest of the topic. The offset 2308 is far ahead the last consumed message at offset 9 and there are certainly messages at offsets between 9 and 2308. But for some reason Kafka jumps ahead, though this is certainly not what I expect when I just pause and unpause it. Is there any way to make pause/resume work as expected, i.e. resume from the last consumed offset?
The text was updated successfully, but these errors were encountered: