what is kafka topic

what is kafka topic

1 year ago 37
Nature

A Kafka topic is a category or a common name used to store and publish a particular stream of data in Apache Kafka. Topics are partitioned, meaning a topic is spread over a number of "buckets" located on different Kafka brokers. Each topic has a name that is unique across the entire Kafka cluster. Producers write data to topics, and consumers read data from topics. Kafka topics are multi-subscriber, meaning that a topic can have zero, one, or multiple consumers subscribing to that topic and the data written to it.

Topics are similar to tables in a database, but they do not contain all constraints. Developers create different topics to hold different kinds of events and different topics to hold filtered and transformed versions of the same kind of event. The logs that underlie Kafka topics are files stored on disk, and every topic can be configured to expire data after it has reached a certain age or size.

Partitions allow a topics log to scale beyond a size that will fit on a single server (a broker) and act as the unit of parallelism. Kafka brokers are containers that hold several topics with their multiple partitions. The brokers in the cluster are identified by an integer id only, and each broker is holding a topic with its partitions. The partitioning of Kafka topics is important for scaling, and client applications can read from multiple brokers at once because the topics are partitioned over several brokers.

Read Entire Article