What are the retention policies for Kafka messages?
Kafka has several different message retention policies.
- The deletion policy is set to automatically delete messages when they exceed the designated retention period.
- Compression is the deletion strategy: Messages will be compressed and old versions will be deleted once they reach the retention period.
- The deletion strategy is set to compact: once messages reach the retention period, only duplicate keys in key-value pairs will be deleted, retaining the latest messages.