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.
Do we need to write any code for this ? Or is it taken care by kafka's internal classes ?
Share this highlighthttp://www.safaribooksonline.com/a/kafka-the-definitive/21510039/