C1000-141 · Question #56
What is used to prevent duplicate processing of Kafka messages?
The correct answer is A. Offset value. Kafka uses offset values (A) to track which messages a consumer has already processed - each message in a partition has a unique, sequential offset number, and consumers commit their current offset to remember their position. If a consumer restarts, it resumes from the last…
Question
What is used to prevent duplicate processing of Kafka messages?
Options
- AOffset value
- BSequential queues
- CDeleting messages
- DRetention periods
How the community answered
(46 responses)- A76% (35)
- B7% (3)
- C15% (7)
- D2% (1)
Explanation
Kafka uses offset values (A) to track which messages a consumer has already processed - each message in a partition has a unique, sequential offset number, and consumers commit their current offset to remember their position. If a consumer restarts, it resumes from the last committed offset, avoiding reprocessing.
Why the distractors are wrong:
- B (Sequential queues): Kafka uses partitions, not "sequential queues" - and ordering alone doesn't prevent duplicates.
- C (Deleting messages): Kafka is a log-based system; messages are retained, not deleted after consumption. Deleting them would break the ability for multiple consumers to independently read the same data.
- D (Retention periods): Retention controls how long messages are stored before expiry - it has nothing to do with tracking what's been processed.
Memory tip: Think of offsets like a bookmark in a book - your bookmark (committed offset) tells you exactly where you left off, so you never re-read pages you've already finished.
Topics
Community Discussion
No community discussion yet for this question.