Topic
A topic is a named messaging destination or stream to which producers publish messages or records and from which consumers receive or read them.
Apache Kafka in Action
A Kafka topic is a named stream of records to which producers publish and from which consumers read.
- How it is used
- Organizes producer-published records into named streams that independent consumers can read for real-time processing or later analysis.
- How deep it goes
- Works through creation and reading, then connects topics to partitions, replication, and leader metadata without detailing their implementations.
- Examples
- Uses a product-price changelog, Kafka command-line tools, and separate inventory and sales-analysis consumers.
- What you can do after
- Operate/configure it with kafka-topics.sh, then publish and independently reread price updates with Kafka console tools.
Kafka for Architects
A Kafka topic is a named, append-oriented stream of records that Kafka stores and makes available to consumers.
- How it is used
- Uses topics to route related messages between producers and consumers and to separate event types in a customer-data workflow.
- How deep it goes
- Explains naming, subscriptions, partitions, ordering, retention and compaction, including the limits of cross-partition order and key lookup.
- Examples
- Uses separate transaction and profile topics for a customer dashboard and a compacted account-balance topic for current state.
- What you can do after
- Operate/configure Kafka topics by choosing keys, partitioning and retention policies to meet ordering, history and current-state needs.
Kafka Streams in Action, Second Edition
A Kafka topic is a named, append-only stream of records that producers publish to and consumers read from.
- How it is used
- Connects producers and independent consumers through durable event storage for event-streaming applications.
- How deep it goes
- Explains topic storage, partitions, replication, ordering, local creation, and consumer polling; defers prior Schema Registry detail.
- Examples
- Uses retail sales, rewards, sales trends, inventory, and keyed login-search-purchase clickstream events.
- What you can do after
- Operate/configure topics locally, then produce and poll records through Kafka clients.
Read how Kafka Streams in Action, Second Edition explains topic →
AI-Powered Developer: Build software with ChatGPT and Copilot
A Kafka topic is a named, partitioned stream to which producers publish records and from which consumers read them.
- How it is used
- Deploys topics as event streams connecting producers, consumers, and domain updates in an asset-monitoring application.
- How deep it goes
- Demonstrates creation, console operations, Python consumption, JSON records, and architectural review, but does not detail Kafka internals.
- Examples
- Uses the asset_location topic, location-update JSON records, console commands, and a Python KafkaConsumer.
- What you can do after
- Operate/configure a local topic, publish and consume records, and evaluate generated consumer code for coupling and correctness.
Read how AI-Powered Developer: Build software with ChatGPT and Copilot explains topic →
Digital Twins in Action
An MQTT topic is a hierarchical name used to route published messages to clients that subscribe to matching topic names.
- How it is used
- Routes sensor messages from publishers to subscribed consumers in a home digital twin’s unified MQTT message bus.
- How deep it goes
- Defines topics and develops a four-level naming convention with subscription examples; leaves payload interpretation to a separate decoder.
- Examples
- Uses hierarchical home sensor names, a Python publish-and-subscribe listing, and a bedroom sensor’s encoded message.
- What you can do after
- Build it from scratch: name sensor streams hierarchically and select messages through topic subscriptions.
Related concepts
- partitionhas part · A partition is a distinct subdivision of a larger data, storage, or work unit that can be stored, managed, or processed separately.
- persistent queryproduced by · A persistent query is a server-side ksqlDB query whose continuously computed results are stored in a Kafka topic for later consumption.
- sink nodeused by · A sink node is a terminal or receiving component in a data or flow system that accepts incoming data, messages, or flow for consumption, processing, or storage.
- kafka-console-consumerused by · kafka-console-consumer is an Apache Kafka command-line utility that reads records from topics or partitions and prints them to the console.
- publish/subscribe modelimplements · The publish-subscribe model is a messaging pattern in which publishers send messages without addressing specific recipients, and subscribers receive messages according to their interests or subscriptions.
- replication factorconfigured by · A replication factor is the configured number of copies maintained for each replicated data item or resource.
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.




