Bird
0
0

A Kafka consumer reads messages from a topic but sees duplicates. What could be a reason related to topic organization?

medium📝 Debug Q7 of 15
Kafka - Topics and Partitions
A Kafka consumer reads messages from a topic but sees duplicates. What could be a reason related to topic organization?
AThe topic is encrypted
BThe topic name is misspelled
CThe topic has multiple partitions and consumer offsets are not committed
DThe producer sent duplicate messages intentionally
Step-by-Step Solution
Solution:
  1. Step 1: Understand partition and offset role

    Kafka topics with multiple partitions require consumers to commit offsets to avoid duplicates.
  2. Step 2: Identify cause of duplicates

    If offsets are not committed, consumers may re-read messages causing duplicates.
  3. Final Answer:

    The topic has multiple partitions and consumer offsets are not committed -> Option C
  4. Quick Check:

    Duplicates cause = Uncommitted offsets in multi-partition topic [OK]
Quick Trick: Commit offsets to avoid duplicates in multi-partition topics [OK]
Common Mistakes:
  • Blaming misspelled topic name
  • Assuming encryption causes duplicates
  • Ignoring offset management

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Kafka Quizzes