Process Flow - Log compaction
Start: Kafka Topic with Log
New Messages Appended
Log grows with keys and values
Log Compaction Triggered
For each key, keep only latest message
Old duplicates removed
Compacted Log Ready for Consumers
Log compaction keeps only the latest message per key in a Kafka topic, removing older duplicates to save space and ensure consumers get the newest data.