Bird
Raised Fist0

What will be the output behavior if a Kafka producer has enable.idempotence=true but acks=1?

medium📝 Predict Output Q5 of Q15
Kafka - Message Delivery Semantics

What will be the output behavior if a Kafka producer has enable.idempotence=true but acks=1?

AIdempotence works normally with <code>acks=1</code>.
BProducer will throw a configuration error at startup.
CIdempotence is disabled because <code>acks</code> is not set to <code>all</code>.
DProducer will retry infinitely regardless of idempotence.
Step-by-Step Solution
Solution:
  1. Step 1: Check idempotence requirements

    Idempotence requires acks=all to guarantee full acknowledgment from all replicas.
  2. Step 2: Effect of acks=1

    The KafkaProducer will throw a ConfigException at startup since idempotence requires acks=all.
  3. Final Answer:

    Producer will throw a configuration error at startup. -> Option B
  4. Quick Check:

    Idempotence needs acks=all else ConfigException [OK]
Quick Trick: Idempotence requires acks=all, else config error [OK]
Common Mistakes:
MISTAKES
  • Assuming idempotence works with acks=1
  • Thinking it silently disables idempotence
  • Confusing retry behavior with acks setting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes