Kafka retains events for a configurable period (or size), keeping them in the partition logs even after consumption — enabling replay and multiple consumers. Understanding retention and log management is important for using Kafka and managing storage.
Retention — events are kept
Unlike traditional queues, Kafka RETAINS events (doesn't delete on consumption):
→ events stay in the partition log for a configured RETENTION period (e.g. 7 days) or
SIZE limit
→ enables: REPLAY (re-read history), multiple consumers reading independently, late
consumers catching up
→ after retention expires → old segments are deleted (or compacted)
→ Kafka is a durable LOG, not just a transient queue
