I am using consumer from https://github.com/confluentinc/confluent-kafka-go. The kafka version is 0.10.1.0.
Here is the configuration of my consumer:
kafkaClient, err := kafka.NewConsumer(&kafka.ConfigMap{
"bootstrap.servers": broker,
"group.id": "udwg20",
"session.timeout.ms": 60000,
"go.events.channel.enable": true,
"go.application.rebalance.enable": true,
"default.topic.config": kafka.ConfigMap{
"auto.offset.reset": "earliest",
"enable.auto.commit": true,
"auto.commit.interval.ms": 10000}})
At the beginning, all current-offset and lag was showed, but after running several hours, the offset and lag of some partitions (which are not received any new message) become unknown. If there is a message come to a partition which its offset and lag are unknown, the offset and lag will be visible again, and the message will be consumed.
When there are some partitions with unknown current-offset and lag, I restart the consumer, at this time, all current partitions with unknown current-offset and lag status will be consumed again from beginning, but other partitions seem to run normally.
I also used a python consumer that consumes message from this topic with a different consumer group id. the python consumer seem to work well without any partition which has unknown current-offset and lag.