retention.bytes
The topic property that caps how many bytes each partition may keep before the oldest segments are deleted.
In more detail
The limit applies per partition, not to the whole topic. The default of -1 means no size limit, so only time-based retention applies.
Example
rpk topic alter-config events -s retention.bytes=1000000Related terms
- retention — How long data such as backups, logs or snapshots is kept before it is deleted.
- retention.ms — The topic property that sets the maximum age, in milliseconds, of records before their segment becomes eligible for deletion.
- log segment — One file in the series of files that together make up a partition's log on disk.
- bytes, kilobytes, megabytes — Units of data size: a kilobyte is about a thousand bytes, a megabyte about a million, a gigabyte about a billion.
Taught in
- Retention Deletes Files, Not Records — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Retention: Time, Size And Why Data Stays — Apache Kafka & Event Streaming