1

I'm using the consumer.c from https://github.com/edenhill/librdkafka/blob/master/examples/consumer.c without any changes and executing it as ./consumer broker groupid topicname and rd_kafka_consumer_poll returns null most of the times (except for certain groupid values) even though there is data present in the kafka cluster. I'd understand if some number of calls return null but I don't understand why it is always null.

I have tried increasing the poll timeout from 100ms to 1000ms, it still doesn't make any difference and returns null all the time. But at certain random groupid values, it does fetch all the data from the cluster. On repeated runs, I've to keep increasing the groupid value to random values for the consumer to fetch data.

  1. Is this the expected behavior of rd_kafka_consumer_poll ? Or is there something I've to change in the implementation.
Reddy
  • 11
  • 5

0 Answers0