Skip to content
Theory · Kafka: topics, partitions, offsets · lesson 5 of 7

Retention: how long the log keeps records

Kafka does not delete records after a read, but the disk will not let it keep them forever either. So every topic has a rule by which old records go. It looks at time and size, but not at whether anyone has managed to read the records.

In this lesson

  • Retention by time and by size
  • Reading has nothing to do with it
  • Segments
  • What happens to the offsets
  • Common mistake
  • Key points