Skip to content
Theory · Kafka reliability · lesson 5 of 7

Log compaction and tombstones

Sometimes you need not the whole history from a topic but only the last value of each key: the current price of a product or a customer's current address. Retention by time does not fit here. After a week it deletes both the outdated prices and the only record of a product whose price has not changed for a long time. For such topics Kafka has another way to clean the log.

In this lesson

  • Compaction
  • Tombstone
  • Let's check on the broker
  • Common mistake
  • Key points