BeginnerCore Concepts
How does a consumer know which offset to start from?
Reference answer
A consumer's starting offset comes from the first source that applies: 1) Seek: if the code calls seek(partition, offset), that overrides the fetch offset used on the next poll. 2) Committed offset: if the consumer group has a committed offset for the partition, the consumer resumes from it. 3) auto.offset.reset: if there is no initial offset in Kafka, or the current offset no longer exists on the server (for example a new group, or offsets that expired or data that was deleted), this setting decides. latest (the default) resets to the latest offset, earliest resets to the earliest offset the partition still has, by_duration:<duration> resets to a point that far back in time, and none throws an exception to the consumer. Caution: with latest, altering the number of partitions can cause message loss, because new partitions may receive messages before the consumer resets its offsets.
Expected key concepts: committed offset, auto.offset.reset, earliest, latest, none, by_duration, seek, new group, expired, next poll
How did that feel?
Your own verdict, not the score. It shows up next to this question in the list, so you can come back to the shaky ones.