How does client handle this situation?

A client connects to a broker in the cluster and sends a fetch request for a partition in a topic. It gets an exception Not Leader For Partition Exception in the response .

How does client handle this situation?
A . Get the Broker id from Zookeeper that is hosting the leader replica and send request to it
B . Send metadata request to the same broker for the topic and select the broker hosting the leader replica
C . Send metadata request to Zookeeper for the topic and select the broker hosting the leader replica
D . Send fetch request to each Broker in the cluster

Answer: B

Explanation:

In case the consumer has the wrong leader of a partition, it will issue a metadata request. The Metadata request can be handled by any node, so clients know afterwards which broker are the designated leader for the topic partitions. Produce and consume requests can only be sent to the node hosting partition leader.

Latest CCDAK Dumps Valid Version with 150 Q&As

Latest And Valid Q&A | Instant Download | Once Fail, Full Refund

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments