retention.ms
The topic property that sets the maximum age, in milliseconds, of records before their segment becomes eligible for deletion.
In more detail
Kafka's default is 604800000, which is seven days. Retention time is a minimum rather than an exact moment, because the broker only deletes a segment once it is closed and every record in it is old enough.
Example
rpk topic alter-config events -s retention.ms=3600000Related terms
- retention — How long data such as backups, logs or snapshots is kept before it is deleted.
- retention.bytes — The topic property that caps how many bytes each partition may keep before the oldest segments are deleted.
- millisecond — One thousandth of a second, the usual unit for request latency.
- log segment — One file in the series of files that together make up a partition's log on disk.
Taught in
- Retention Deletes Files, Not Records — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Replay Everything Since Eleven — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Two Copies Of One Service — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Eleven Thousand Scans That Never Arrived — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Full Disks On Black Friday — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- The Night Before The Administrator Exam — Confluent Apache Kafka Certifications (CCDAK and CCAAK) Exam Prep
- Retention: Time, Size And Why Data Stays — Apache Kafka & Event Streaming