AlgoMaster Logo

Log Retention

High Priority11 min readUpdated September 13, 2026

A reporting service stops processing orders overnight. When it returns, Kafka can let it resume from its saved offset, provided the required records are still available. Whether that recovery succeeds depends partly on retention: the rules that determine how much history Kafka keeps.

Retention also bounds storage growth and determines how far applications can replay. We'll examine time and size limits, follow a segment through deletion, and see what consumers must do when their saved position falls outside the retained log.

Our examples use a KRaft-based cluster, regular consumer groups, and an orders.placed topic with cleanup.policy=delete. The cluster does not use tiered storage, and the illustrated records are non-transactional and replication-committed. Timestamps and traffic rates are explicit assumptions rather than production defaults.

Premium Content

Subscribe to unlock full access to this content and more premium articles.