librdkafka icon indicating copy to clipboard operation
librdkafka copied to clipboard

Consumer cannot consume messages when auto.reset.offset=latest

Open nikepakou opened this issue 4 years ago • 2 comments

Read the FAQ first: https://github.com/edenhill/librdkafka/wiki/FAQ

Description

Consumer cannot consume messages when auto.reset.offset=latest

How to reproduce

I'm using the consumer.c from https://github.com/edenhill/librdkafka/blob/master/examples/consumer.c, and I change auto.reset.offset=latest and set auto.commit.offset=false , even though send data continuously into the kafka cluster.

IMPORTANT: Always try to reproduce the issue on the latest released version (see https://github.com/edenhill/librdkafka/releases), if it can't be reproduced on the latest version the issue has been fixed.

Checklist

By using the consumer.c from https://github.com/edenhill/librdkafka/blob/master/examples/consumer.c with change auto.reset.offset=latest and set auto.commit.offset=false

IMPORTANT: We will close issues where the checklist has not been completed.

Please provide the following information:

  • [x] librdkafka version (release number or git tag): <commit c28fbbb4>
  • [x] Apache Kafka version: <0.10.2.0>
  • [x] librdkafka client configuration: <auto.reset.offset=latest, auto.commit.offset=false>
  • [x] Operating system: <Centos7.4>

nikepakou avatar May 24 '21 06:05 nikepakou

Reproduce with debug=all on latest master and provide the logs.

edenhill avatar Apr 08 '22 10:04 edenhill

This is happening when we start a consumer after the logs have undergone retention, but setting auto.offset.reset to latest does not continue from the latest offset instead it fails to fetch the offsets but setting it to earliest works although the logs say failed to fetch offsets.I am using v1.8.2 go client

shubhang93 avatar May 06 '22 12:05 shubhang93