Bird
0
0

If a Kafka producer is configured with acks=all and min.insync.replicas=2, what happens when only one replica is in sync?

medium📝 Predict Output Q5 of 15
Kafka - Producers
If a Kafka producer is configured with acks=all and min.insync.replicas=2, what happens when only one replica is in sync?
AThe producer retries sending until all replicas are in sync.
BThe producer will fail to send the message and throw an exception.
CThe producer waits for the leader only and succeeds.
DThe producer sends the message without waiting for replicas.
Step-by-Step Solution
Solution:
  1. Step 1: Understand acks=all with min.insync.replicas

    With acks=all, the producer waits for all in-sync replicas to acknowledge.
  2. Step 2: Check min.insync.replicas condition

    If fewer than min.insync.replicas are available, the broker rejects the message, causing producer failure.
  3. Final Answer:

    The producer will fail to send the message and throw an exception. -> Option B
  4. Quick Check:

    acks=all + min.insync.replicas enforces strict replication [OK]
Quick Trick: acks=all with min.insync.replicas enforces strict success [OK]
Common Mistakes:
  • Assuming message sends with only one replica in sync
  • Confusing min.insync.replicas with total replicas
  • Thinking producer retries automatically

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes