Srihitha Technologies

Apache Kafka Interview Questions

Apache Kafka Interview Questions

 

1. What is Apache Kafka?
Ans. Apache Kafka is a Scala-based publish-subscribe messaging system created by Apache. It is a logging service that is distributed, replicated, and segmented.

2. What is the role of offset in Apache Kafka?
Ans. Offset is a sequential ID number or a unique id number assigned to the messages in the partitions. We use Offsets to identify each message in the partition uniquely with the id available within the partition.

3. What is a consumer group?
Ans. Consumer Groups are an Apache Kafka-exclusive notion. Each Kafka consumer group comprises one or more consumers who consume a collection of committed topics in unison.

4. Can Kafka be used without ZooKeeper?
Ans. No, bypassing Zookeeper and connecting directly to the Kafka server is not feasible. If ZooKeeper is unavailable, then it is unable to serve any client request.

5. What is a Kafka topic?
Ans. A topic is a term which means a genre or feed to which data is published. In Kafka, topics can be multi-subscriber that means, a topic may have 0, 1, or many consumers who subscribe to the information stored. The Kafka cluster keeps a partitioned log for each topic.

6. What is the meaning of broker in Kafka?
Ans. In Kafka cluster, a broker term is used to refer Server.

7. What happens if the preferred replica is not in the ISR?
Ans. If the preferred replica is not in the ISR, the controller will fail to move leadership to the preferred replica.

8. What is the role of Kafka producer API?
Ans. The Kafka procedure API works as the producer functionality through one API call to the client. The Kafka producer API combines the efforts of Kafka.producer.SyncProducer and the Kafka.producer.async.Async Producer.

9. What is load balancing?
Ans. The load balancer balances the loads across various systems if the workload is raised as a result of message replication across numerous systems.

10. What is Kafka’s Partition
Ans. Each Kafka broker has a limited number of partitions. With Kafka, each partition can serve as a leader or a clone of a subject.

11. What is the maximum size of a message that Kafka can receive?
Ans. By default, the maximum size of a Kafka message is 1MB (megabyte), we can modify the size accordingly. The broker settings facilitate us to modify the size.

12. What is Kafka’s Stream Processing?
Ans. Kafka’s Stream Processing is referred as Constant, real-time, simultaneous, and record-by-record processing of data.

Apache Kafka Interview Questions
Exit mobile version