Consumer returns empty on poll() after seek() to offset gaps at segment boundaries

2025-04-06 Thread kirin sairento
I suspect this issue is related to log segment boundaries. When dealing with non-contiguous offsets that span across segments—for example: - Segment 1 contains offsets [0, 1, 2] - Segment 2 contains offsets [4, 6, 7] The observed behavior is as follows: - seek(3) + poll() returns empty data - seek

Re: Consumer returns empty on poll() after seek() to offset gaps at segment boundaries

2025-04-09 Thread kirin sairento
Thank you for help, I later tried the while(true) poll, and after iterations, it successfully returned records. However, my use case is a bit weird—the consumer doesn’t need while(true) poll. I’ll see if there’s a better way to handle this.

Re: Consumer returns empty on poll() after seek() to offset gaps at segment boundaries

2025-04-09 Thread kirin sairento
Hello teams I have a GitHub repo to reproduce this issue: https://github.com/nenryo/kafka_consumer_issue On Mon, Apr 7, 2025 at 10:13 AM kirin sairento wrote: > I suspect this issue is related to log segment boundaries. When dealing > with non-contiguous offsets that span across se