Hi, I have a kafka cluster consisting of two servers. I created a topic XYZ with 3 partitions and replication factor of 2.
In the producer side, the producer is configured with broker list of both brokers broker0 and broker1. Topic:XYZ PartitionCount:3 ReplicationFactor:2 Configs: Topic: ReplicatedTopic Partition: 0 Leader: 1 Replicas: 0,1 Isr: 0,1 Topic: ReplicatedTopic Partition: 1 Leader: 0 Replicas: 1,0 Isr: 0,1 Topic: ReplicatedTopic Partition: 2 Leader: 1 Replicas: 0,1 Isr: 0,1 While the producers puts message in the kafka, when I kill the brokers , lets say broker1, I will receive exception (java.nio.channels.ClosedChannelException) in the producer side and after of couple of retries the producer crashes. I understand that producer get exception because the leader node for partition 0 is dead, BUT why it does not automatically use broker1 instead???? I set the following config in setup_ leader.imbalance.per.broker.percentage=1 leader.imbalance.check.interval.seconds=5