Apache Kafka Interview Questions and Answers
Ques 1. What is Apache Kafka?
Apache Kafka is a publish-subscribe open source message broker application. This messaging application was coded in “Scala”. Basically, this project was started by the Apache software. Kafka’s design pattern is mainly based on the transactional logs design.
Ques 2. Enlist the several components in Kafka.
- Topic: Kafka Topic is the bunch or a collection of messages.
- Producer: In Kafka, Producers issue communications as well as publishes messages to a Kafka topic.
- Consumer: Kafka Consumers subscribes to a topic(s) and also reads and processes messages from the topic(s).
- Brokers: While it comes to manage storage of messages in the topic(s) we use Kafka Brokers.
Ques 3. Explain the role of the offset.
There is a sequential ID number given to the messages in the partitions what we call, an offset. So, to identify each message in the partition uniquely, we use these offsets.
Ques 4. What is a Consumer Group?
The concept of Consumer Groups is exclusive to Apache Kafka. Basically, every Kafka consumer group consists of one or more consumers that jointly consume a set of subscribed topics.
Ques 5. What is the role of the ZooKeeper in Kafka?
Apache Kafka is a distributed system is built to use Zookeeper. Although, Zookeeper’s main role here is to build coordination between different nodes in a cluster. However, we also use Zookeeper to recover from previously committed offset if any node fails because it works as periodically commit offset.
Most helpful rated by users:
- Explain the concept of Leader and Follower.
- Enlist the several components in Kafka.
- What are main APIs of Kafka?