Hello ,
I have 20 pods running consumer . And consumer group is rebalancing frequently.
Kafka consumer is written in go lang
I have added the session.timeout as 45 sec and heartbeat interval is kept as default .
Any idea on why the rebalancing is happening frequently?
You need to figure out the reason for the rebalance… Does the group coordinator remove a member from the group due to missing heartbeat? Is poll() not called quickly enough and the consumer pro-actively send a leave-group request?
Broker and consumer logs should help you to find out.
hey,
i had some doubt on kafka consumer func StartConsumer() {
// Kafka consumer configuration
cfg := &kafka.ConfigMap{
“bootstrap.servers”: utils.GetConfig().KafkaConsumer.BootstrapServer,
“group.id”: utils.GetConfig().KafkaConsumer.KafkaGroupId,
“auto.offset.reset”: utils.GetConfig().KafkaConsumer.KafkaAutoOffsetReset,
“enable.auto.commit”: false,
“session.timeout.ms”: utils.GetConfig().KafkaConsumer.SessionTimeOut,
“heartbeat.interval.ms”: utils.GetConfig().KafkaConsumer.SessionTimeOut / 3,
“debug”: “all”,
}
this conifg ( “partition.assignment.strategy”: “sticky”, )
giving me config not found , how can i make htis consumer from range to sticky ?