Bird
Raised Fist0

You have enabled EOS in your Kafka producer but notice duplicate messages in the topic. Which of the following is the most likely cause?

medium📝 Debug Q14 of Q15
Kafka - Message Delivery Semantics
You have enabled EOS in your Kafka producer but notice duplicate messages in the topic. Which of the following is the most likely cause?
AProducer did not call <code>initTransactions()</code> before starting transactions
BProducer set <code>enable.idempotence</code> to true
CConsumer group is reading messages multiple times
DTopic has replication factor set to 3
Step-by-Step Solution
Solution:
  1. Step 1: Check EOS setup requirements

    initTransactions() must be called before using transactions to ensure EOS works properly.
  2. Step 2: Analyze other options

    Producer set enable.idempotence to true is correct config, A relates to consumers not producers, D is unrelated to duplicates.
  3. Final Answer:

    Producer did not call initTransactions() before starting transactions -> Option A
  4. Quick Check:

    Missing initTransactions() causes duplicates [OK]
Quick Trick: Call initTransactions() before transactions for EOS [OK]
Common Mistakes:
MISTAKES
  • Confusing consumer behavior with producer duplicates
  • Assuming replication factor affects duplicates
  • Thinking idempotence alone fixes all issues

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes