CCDAK · Question #56
A producer application was sending messages to a partition with a replication factor of 2 by connecting to Broker 1 that was hosting partition leader. If the Broker 1 goes down, what will happen?
The correct answer is A. The producer will automatically produce to the broker that has been elected leader. Once the client connects to any broker, it is connected to the entire cluster and in case of leadership changes, the clients automatically do a Metadata Request to an available broker to find out who is the new leader for the topic. Hence the producer will automatically keep on…
Question
A producer application was sending messages to a partition with a replication factor of 2 by connecting to Broker 1 that was hosting partition leader. If the Broker 1 goes down, what will happen?
Options
- AThe producer will automatically produce to the broker that has been elected leader
- BThe topic will be unavailable
- CThe producer will stop working
How the community answered
(45 responses)- A87% (39)
- B4% (2)
- C9% (4)
Explanation
Once the client connects to any broker, it is connected to the entire cluster and in case of leadership changes, the clients automatically do a Metadata Request to an available broker to find out who is the new leader for the topic. Hence the producer will automatically keep on producing to the correct Kafka Broker.
Topics
Community Discussion
No community discussion yet for this question.