Apache Kafka

Apache Kafka Interview Questions and Answers

What Is Kafka?
Apache Kafka is an open-source message broker application. Apache Kafka is message broker application that is written in Scala and developed by the Apache Software Foundation.

Apache Kafka is originally developed by LinkedIn and developed as an open sourced in early 2011.

Apache Kafka is a distributed, partitioned and replicated log service.

What are the different components that are available in Kafka?
There are four different components -
1.      Topic
2.      Producer
3.      Brokers
4.      Consumer

What are main APIs of Kafka?
The Kafka has four main APIs -
1.      Producer API
2.      Consumer API
3.      Streams API
4.      Connector API

What are the Features of Kafka?
1.      Support for millions of messages with modest hardware
2.      Highly scalable
3.      Kafka with proper configurations can ensure zero data loss
4.      Used with real-time streaming applications like Apache Spark & Storm

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

What is the traditional method of message transfer?
Two methods are available for message transfer -
1.      Queuing
2.      Publish-Subscribe

How to start Kafka server?
To start the Kafka server, go to -> bin/kafka-server-start.sh config/server.properties

How to start ZooKeeper server?
To start the ZooKeeper server, go to -> bin/zookeeper-server-start.sh config/zookeeper.properties

What are the benefits of Apache Kafka over the traditional technique?
1.      Scalable
2.      Durable
3.      Very Fast reads and writes
4.      Robust
5.      It provides fault tolerance guarantees and durability

What Is partitioning key?
The partitioning key indicates the destination partition of the message and used to specify the target divider of the memo within the producer.

By default, a hashing-based Practitioner is used to determine the partition ID given the key.

What Is the maximum size of a message that can be received by the Kafka?
The maximum size of a message is - 1000000 bytes (approx.)

What is the main difference between Kafka and Fume?
Both products are used to process data in the real-time but Kafka is proven more scalable and ensures durability.

What Are the Role of Kafka Producer API plays?
The main aim of Kafka Producer API is to disclose all the producer performance through a single API to the clients.

It also responsible for covering the two producers -
1.      kafka.producer.SyncProducer
2.      kafka.producer.async.AsyncProducer

What Is the role of the ZooKeeper?
Zookeeper is used to store offsets of messages consumed for a specific topic and partition by a specific Consumer Group.

Is it possible to use Kafka without ZooKeeper?
No!, it is not possible to bypass Zookeeper and connect directly to the Kafka. If ZooKeeper is down, then not possible to service any client request.

When does QueueFullException occur?
The QueueFullException typically occurs when the Producer attempts to send messages at a pace that the Broker cannot handle.

Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog - https://www.code-sample.com/
My Books - Book 1 and Book 2

www.code-sample.com/. Powered by Blogger.