Skip to content
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

Does not support setting offset in KafkaClient mode #231

Closed
Leonidas-from-XIV opened this issue Feb 20, 2020 · 1 comment
Closed

Does not support setting offset in KafkaClient mode #231

Leonidas-from-XIV opened this issue Feb 20, 2020 · 1 comment

Comments

@Leonidas-from-XIV
Copy link

Leonidas-from-XIV commented Feb 20, 2020

Reading from an existing and populated topic in -G (KafkaClient) mode does not allow setting the offset:

kafkacat -C -b localhost:9092 -o beginning -G cat-$RANDOM test

Just reads from the end (which contains nothing). For comparison, the official client

kafka-console-consumer.sh --bootstrap-server localhost:9092 --from-beginning --topic test --group jav-$RANDOM

does enumerate through all the messages in the topic. I originally discovered this when trying to consume using librdkafka and wondered for an example on how to set the offset in the KafkaClient mode. But it turns out, KafkaCat does not apply any offsets in this mode and for some reason (even despite auto.offset.reset=earliest) it seems to default to latest.

@edenhill
Copy link
Owner

edenhill commented May 28, 2020

Fixed on master

edenhill added a commit that referenced this issue May 28, 2020
And let low-level consumer start at BEGINNING offset by default, not 0.
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