CCDAK · Question #217
You are working on a Kafka cluster with three nodes. You create a Kafka topic named orders on this cluster with: - replication factor=3 - min.insync.replicas=2 - acks=all Which exception will be…
The correct answer is A. NotEnoughReplicasException. With replication.factor=3, min.insync.replicas=2, and acks=all, at least 2 in-sync replicas must acknowledge a write for it to succeed. If 2 brokers are down, only 1 replica is available, which is not enough to meet the min.insync.replicas requirement. As a result, the producer…
Question
You are working on a Kafka cluster with three nodes. You create a Kafka topic named orders on this cluster with:
- replication factor=3
- min.insync.replicas=2
- acks=all
Which exception will be generated if two brokers are down due to network delay?
Options
- ANotEnoughReplicasException
- BNetworkException
- CNotCoordinatorException
- DNotLeaderForPartitionException
How the community answered
(38 responses)- A84% (32)
- B5% (2)
- C8% (3)
- D3% (1)
Explanation
With replication.factor=3, min.insync.replicas=2, and acks=all, at least 2 in-sync replicas must acknowledge a write for it to succeed. If 2 brokers are down, only 1 replica is available, which is not enough to meet the min.insync.replicas requirement. As a result, the producer will receive a NotEnoughReplicasException indicating that the required number of in-sync replicas is not available to safely commit the message.
Topics
Community Discussion
No community discussion yet for this question.