Configuring Kafka Log Compaction to Keep the Latest State per Key
Enable Kafka log compaction with cleanup.policy=compact, write keyed records and tombstones correctly, tune the dirty ratio and segment roll, and verify the cleaner kept only the latest value per key.