• Register
100 points

Want to solve programming problems and get paid for it? If that sounds interesting to you then contact us.

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.

2.Enlist the several components in Kafka?

The most important elements of Kafka are:

  • 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.

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.

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.

5. List the various components in Kafka?

The four major components of Kafka are:

  • Topic – a stream of messages belonging to the same type

  • Producer – that can publish messages to a topic

  • Brokers – a set of servers where the publishes messages are stored

  • Consumer – that subscribes to various topics and pulls data from the brokers.

6. Explain the role of the offset?

Messages contained in the partitions are assigned a unique ID number that is called the offset. The role of the offset is to uniquely identify every message within the partition.

7. What is a Consumer Group?

Consumer Groups is a concept exclusive to Kafka.  Every Kafka consumer group consists of one or more consumers that jointly consume a set of subscribed topics.

8.What is the role of the ZooKeeper in Kafka?

Ans. 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.

9. Explain the concept of Leader and Follower?

Every partition in Kafka has one server which plays the role of a Leader, and none or more servers that act as Followers. The Leader performs the task of all read and write requests for the partition, while the role of the Followers is to passively replicate the leader. In the event of the Leader failing, one of the Followers will take on the role of the Leader. This ensures load balancing of the server.

10. What roles do Replicas and the ISR play?

Replicas are essentially a list of nodes that replicate the log for a particular partition irrespective of whether they play the role of the Leader. On the other hand, ISR stands for In-Sync Replicas. It is essentially a set of message replicas that are synced to the leaders.

100 points