nerdexam
Confluent

CCDAK · Question #56

A producer application was sending messages to a partition with a replication factor of 2 by connecting to Broker 1 that was hosting partition leader. If the Broker 1 goes down, what will happen?

The correct answer is A. The producer will automatically produce to the broker that has been elected leader. Once the client connects to any broker, it is connected to the entire cluster and in case of leadership changes, the clients automatically do a Metadata Request to an available broker to find out who is the new leader for the topic. Hence the producer will automatically keep on…

Developing Kafka Producers

Question

A producer application was sending messages to a partition with a replication factor of 2 by connecting to Broker 1 that was hosting partition leader. If the Broker 1 goes down, what will happen?

Options

  • AThe producer will automatically produce to the broker that has been elected leader
  • BThe topic will be unavailable
  • CThe producer will stop working

How the community answered

(45 responses)
  • A
    87% (39)
  • B
    4% (2)
  • C
    9% (4)

Explanation

Once the client connects to any broker, it is connected to the entire cluster and in case of leadership changes, the clients automatically do a Metadata Request to an available broker to find out who is the new leader for the topic. Hence the producer will automatically keep on producing to the correct Kafka Broker.

Topics

#leader election#producer failover#replication factor#fault tolerance

Community Discussion

No community discussion yet for this question.

Full CCDAK Practice