liveBook · Manning

Compacted topic

A compacted topic is a Kafka topic whose log compaction retains the latest record for each key while allowing obsolete records to be removed.

How 2 Manning books explain it

Kafka for Architects

A compacted topic is a Kafka topic configured to retain at least the latest record associated with each non-null key.

How it is used
Stores recoverable current state for keyed configuration, profiles, changelogs, balances, or prices.
How deep it goes
Explains retention semantics, key partitioning, sequential reads, delayed cleanup, and consumer-visible older records.
Examples
Uses account balances, customer profiles, configuration data, changelogs, and current product prices.
What you can do after
Operate/configure a topic for current keyed state while evaluating sequential replay, delayed cleanup, and storage trade-offs.

Read how Kafka for Architects explains compacted topic →

Kafka Streams in Action, Second Edition

A compacted topic is a Kafka topic whose log retains the latest record for each key rather than retaining every historical record indefinitely.

How it is used
Supports retaining recoverable latest state for keyed event streams and Kafka Streams state-store changelogs.
How deep it goes
Explains key-based cleanup, background log cleaning, configuration, tombstones, and combined policies, while deferring broader compaction details.
Examples
Uses stock ticker prices, duplicate keyed updates, tombstones, and a Kafka Streams changelog configuration.
What you can do after
Configure Kafka topics with compaction and choose tombstones or combined cleanup policies for keyed state retention.

Read how Kafka Streams in Action, Second Edition explains compacted topic →

What to know first

Related concepts

Questions about compacted topic

What is compacted topic?

A compacted topic is a Kafka topic whose log compaction retains the latest record for each key while allowing obsolete records to be removed.

Which Manning books explain compacted topic?

Kafka for Architects and Kafka Streams in Action, Second Edition.

What should I know before learning compacted topic?

Manning books that teach compacted topic usually introduce topic and message first.

What kinds of compacted topic are there?

Kinds of compacted topic include changelog.

What is compacted topic a kind of?

Compacted topic is a kind of Apache Kafka. Apache Kafka is a distributed event-streaming platform for publishing, storing, and processing streams of records.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.