Bird
0
0

If replica3 is removed from ISR due to lag, what will happen when a producer sends a message with acks=all and min.insync.replicas=2?

medium📝 Predict Output Q4 of 15
Kafka - Cluster Architecture
Consider a Kafka topic with 3 replicas and ISR = [replica1, replica2, replica3]. If replica3 is removed from ISR due to lag, what will happen when a producer sends a message with acks=all and min.insync.replicas=2?
AThe producer will retry indefinitely until replica3 rejoins ISR
BThe message will be rejected because ISR size is less than min.insync.replicas
CThe message will be written but only to the leader, ignoring ISR
DThe message will be successfully written as long as replica1 and replica2 acknowledge
Step-by-Step Solution
Solution:
  1. Step 1: Understand ISR and min.insync.replicas

    Producer with acks=all requires acknowledgments from at least min.insync.replicas in ISR.
  2. Step 2: Check ISR size after removal

    ISR now has 2 replicas (replica1, replica2), which meets min.insync.replicas=2.
  3. Step 3: Determine outcome

    Message will be accepted as required acknowledgments are met.
  4. Final Answer:

    The message will be successfully written as long as replica1 and replica2 acknowledge -> Option D
  5. Quick Check:

    ISR count >= min.insync.replicas allows write [OK]
Quick Trick: Writes succeed if ISR count ≥ min.insync.replicas [OK]
Common Mistakes:
  • Assuming message rejected if any replica leaves ISR
  • Confusing acks=all with requiring all replicas
  • Thinking producer retries indefinitely

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes