Compaction guarantees the most recent value per key survives. Deleting a key means writing a null value - a tombstone - and that tombstone is itself retained for delete.retention.ms so every consumer has a chance to see the delete.
Run this yourself in the Online Java Compiler, spin up a live REST API in the API Sandbox, or practise with Java interview questions.
Published 2026-08-25