What components are included in Kafka’s architecture?
Kafka’s architecture consists of several key components:
- Producer: The one responsible for creating messages and sending them to one or more topics in the Kafka cluster.
- Consumers read messages from one or multiple topics in a Kafka cluster and process them.
- Each node within a Kafka cluster is a Broker, responsible for storing messages and facilitating communication between producers and consumers.
- Topic categorization of messages, whereby messages are published to different topics and consumers can subscribe to topics of interest to consume messages.
- Each topic can be divided into one or more partitions, with each partition storing a portion of the topic’s data in the broker.
- Each message within a partition has a unique offset, allowing consumers to retrieve messages by specifying the offset.
- Kafka relies on Zookeeper for cluster management and coordination, including storing cluster metadata and monitoring cluster status.