Skip to content
Exercise · Kafka: topics, partitions, offsets · lesson 4 of 7

Exercise: where to start reading

A Kafka consumer has joined a partition and must pick the offset to start reading from. Usually that is the offset its group committed earlier, but there may be none, or Kafka has already deleted the records it points to. Then the auto.offset.reset setting decides. The broker in this exercise is a model in the tests file, not a real Kafka: all that is left of the partition is two offsets.