What is a Kafka topic?
A Kafka topic is the primary unit of storage in Apache Kafka. It’s a log of interesting events for some domain.
What are the properties of a Kafka topic?
Kafka topics are append-only logs, and their contents are immutable. In this way, topics are similar to application logfiles. Because the events never change once written, Kafka topics are very easy to replicate, which allows them to be durably and reliably stored across many nodes in the Kafka cluster.
How are events formatted within a Kafka topic?
Events are written to a Kafka topic as key-value pairs. The key and value can be any binary data you like, but in most cases the key is
null or an ID—some string or integer—and the value is typically a serialized object.
How is data moved into and out of a Kafka topic?
Data is written to a topic using a client called a Kafka producer. Once the data is in a topic, a separate client called a Kafka consumer is used to read that data back out.