Skip to content

Poll for messages always returns empty regardless of index committed #2072

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

Closed
lhmzhou opened this issue Jul 3, 2020 · 0 comments
Closed

Comments

@lhmzhou
Copy link

lhmzhou commented Jul 3, 2020

Hi,

Trying to write a python script that consumes the entire Kafka history of messages from index 0 using the library kafka-python, but am having trouble receiving any messages for some reason. Regardless of what I commit my index to be a poll for messages always returns empty. Is there something wrong with the order of operations?

Here's the output I'm receiving thus far:

part=TopicPartition(topic='SharedKafka2_500000958_Aquila-Vulnerability-Event', partition=2), pos=0, max=61
part=TopicPartition(topic='SharedKafka2_500000958_Aquila-Vulnerability-Event', partition=1), pos=0, max=67
part=TopicPartition(topic='SharedKafka2_500000958_Aquila-Vulnerability-Event', partition=4), pos=0, max=66
part=TopicPartition(topic='SharedKafka2_500000958_Aquila-Vulnerability-Event', partition=3), pos=0, max=64
part=TopicPartition(topic='SharedKafka2_500000958_Aquila-Vulnerability-Event', partition=0), pos=0, max=65
{}

Notice the poll at the bottom is empty despite having roughly 60 messages in each partition (...what?!).

I'm assuming committed offsets are only used on rebalance, otherwise there's an in memory offset that just increases with each poll. If im using auto.offset.reset, do I have to use a random group-id? I've added the reset and commented out the commit and so far I still don't receive any empirical results.

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

No branches or pull requests

2 participants