Essential Apache Kafka Interview Preparation Guide

Broker:
A Kafka cluster is made up of multiple brokers.
These are just individual servers (they can be physical or virtual).
Each broker is responsible for storing data and serving clients.
The more brokers you have, the more data you can store and the more clients you can serve.
Partition
Each broker has a number of partitions.
Each partition is an ordered, immutable sequence of messages that is continually appended to -- think of like a log file.
Partitions are the way Kafka scales as they allow for messages to be consumed in parallel.
Topic
A topic is just a logical grouping of partitions.
Topics are the way you publish and subscribe to data in Kafka.
When you publish a message, you publish it to a topic, and when you consume a message, you consume it from a topic.
Topics are always multi-producer; that is, a topic can have zero, one, or many producers that write data to it
Producers and consumers
Producers are the ones who write data to topics
consumers are the ones who read data from topics.
While Kafka exposes a simple API for both producers and consumers, the creation and processing of messages is on you, the developer. Kafka doesn't care what the data is, it just stores and serves it.
Subscribe to my newsletter
Read articles from Pushkaraj Ogale directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
