What is Kafka Topic Partition?

A Kafka topic can be splited into several parts which are known as the partitions of the topic. The partitioning is used to improve the scalability. Kafka breaks a topic into fractions and stores each of them in different nodes of its distributed system.

We can divide the topic into two different partitions to improve the performance and read from them on the consumer side.

A topic can be splited into several parts which are known as the partitions of the topic. We need to specify the number of partitions while creating a topic. The message/data stored into a partition with an incremental id known as its Offset value.

  1. The kafka topic is a category used to store and publish of messages/data.

  2. Each topic has a name that should be unique across the entire Kafka cluster.

  3. A topic can be splited into several parts which are known as the partitions of the topic.

  4. We need to specify the number of partitions during creating a topic.

  5. The message stored into a partition with an id known as its Offset value.

Kafka Topic Partitions

You need to decide which messages to write to which partitions because if message has no key, messages will be distributed round-robin among all the topic’s partitions.

In the next topic, you will understand about Kafka Producer