Key Concepts in Kafka
What happens in Kafka is,- Topic is container where the messages are published.
- Kafka needs small Zookeeper cluster to operate, i.e. coordination between various processes.
- Message in kafka is a key, value pair with timestamp, value in key, value pair is what we are interested, value is data/message.
- Kafka is usually deployed in cluster setup, which is collection of nodes running kafka, each node in the kafka cluster is called kafka server or kafka broker.
- Kafka cluster is responsible for bringing-in the messages from producer to the consumer reliably.
- A topic consists of partitions.
- Partition: ordered + immutable sequence of messages that is continually appended to.
- Offset: A sequence id given to messages as they arrive in a partition.
- To locate a message, what you need is
Topic name -> Partition Number -> Offset
- Kafka consumers are typically part of a consumer group.
- When multiple consumers are subscribed to a topic and belong to the same consumer group, each consumer in the group will receive messages from a different subset of the partitions in the topic.
Happy Learning !!!
0 Comments