log compaction

A cleanup mode in which the broker keeps at least the latest record for every key and removes older records with the same key.

In more detail

A compacted topic behaves like a table of the latest value per key, so reading it from offset zero rebuilds the current state. Compaction runs in the background on closed segments, so older values stay visible for a while.

Related terms

Taught in

References

Certification courses