Recall & Review
beginner
What is auto-commit in Kafka consumer?
Auto-commit is when Kafka automatically saves the position of the last message read (offset) at regular intervals without programmer intervention.
Click to reveal answer
beginner
What does manual commit mean in Kafka consumer?
Manual commit means the programmer explicitly tells Kafka when to save the offset after processing messages, giving more control over message handling.
Click to reveal answer
intermediate
Why might you prefer manual commit over auto-commit?
Manual commit is preferred when you want to ensure messages are fully processed before saving the offset, avoiding message loss or duplication.
Click to reveal answer
intermediate
What is a risk of using auto-commit in Kafka?
Auto-commit can cause message loss or duplication if the consumer crashes after committing but before processing messages fully.
Click to reveal answer
beginner
How does Kafka track which messages a consumer has read?
Kafka tracks this using offsets, which are numbers marking the position of the last message read in a topic partition.
Click to reveal answer
What does auto-commit do in Kafka consumers?
✗ Incorrect
Auto-commit automatically saves the offset at regular intervals without manual intervention.
Why use manual commit in Kafka?
✗ Incorrect
Manual commit lets you decide when to save offsets, ensuring messages are processed before committing.
What risk is associated with auto-commit?
✗ Incorrect
If a consumer crashes after auto-commit but before processing, messages may be lost or duplicated.
Which Kafka feature tracks the last read message?
✗ Incorrect
Offsets mark the position of the last message read in a partition.
If you want to ensure no message is lost, which commit method is better?
✗ Incorrect
Manual commit allows you to commit offsets only after successful processing, reducing message loss.
Explain the difference between auto-commit and manual commit in Kafka consumers.
Think about who controls when the offset is saved.
You got /4 concepts.
Why might manual commit be safer than auto-commit when processing messages?
Consider what happens if the consumer crashes.
You got /3 concepts.