Offsets & Log Structure — Concept Check
Questions on Offsets & Log Structure. Each message in a partition has a monotonically increasing offset; the log is append-only and immutable, enabling deterministic replay and position-based consumption.
Questions in this quiz
8 questions on Offsets & Log Structure — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A Kafka consumer application is experiencing duplicate message processing. Which delivery semantic is most likely being used?
- AAt-least-once
- BExactly-once
- CNone
- DAt-most-once
2.A segment file in a Kafka partition becomes immutable under which condition?
- AReaches log.retention.hours
- BReaches log.segment.bytes size
- CWhen consumer acknowledges
- DWhen producer writes new message
3.Your Kafka consumer is set to auto-commit offsets every 5 seconds. What risk does this configuration pose?
- ADuplicate message processing
- BHigher storage cost
- CIncreased latency
- DMessage loss on crash
4.A Kafka topic's retention policy is set to compact. What does this imply?
- AOnly the latest record per key is kept
- BMessages are retained indefinitely
- CSegments are deleted after reaching 10 GB
- DAll records are deleted after 7 days
5.A Kafka consumer group is not processing messages. You notice the offsets are reset to the earliest. What could be the cause?
- AConsumer is set to at-most-once
- BSegments are not rolled
- CManual offset reset command was executed
- DProducer is not idempotent
6.A developer believes that committing offsets before processing ensures exactly-once delivery. Why is this incorrect?
- AIt ensures duplicate processing
- BIt requires manual acknowledgment
- CIt only works with idempotent producers
- DIt risks message loss on crash
7.What happens to older segments in a Kafka partition when the retention policy is based on size?
- AArchived to secondary storage
- BMerged with newer segments
- CCompacted to save space
- DDeleted when total size exceeds limit
8.In a Kafka setup, what does the term 'offset' refer to?
- AThe size of a segment file
- BThe position of a consumer group
- CA unique identifier for each message
- DThe time a message was produced