I am facing an issue in Kafka js consumer. I am getting below error when 1 out of 3 of my broker is down and after that I am starting my kafka consumer:
{“level”:”ERROR”,”timestamp”:”2024-05-27T15:37:38.287Z”,”logger”:”kafkajs”,”message”:”[Connection] Response Metadata(key: 3, version: 6)”,”broker”:”x.x.x.x:9092″,”clientId”:”MyConsumer”,”error”:”There is no leader for this topic-partition as we are in the middle of a leadership election”,”correlationId”:5,”size”:48866}
I have set replication factor as 3 and min in sync replica as 2 for my all the topics and no topic is auto created.
I am expecting that the consumer should be able to connect the cluster.
Punya Purba Pattnaik is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.