O'Reilly logo
  • Abhishek Singh thinks this is interesting:

Kafka clients use another request type called a metadata request, which includes a list of topics the client is interested in. The server response specifies which partitions exist in the topics, the replicas for each partition, and which replica is the leader. Metadata requests can be sent to any broker because all brokers have a metadata cache that contains this information.

From

Cover of Kafka: The Definitive Guide

Note

Do we need to write any code for this ? Or is it taken care by kafka's internal classes ?