Created 11-30-2017 03:14 PM
Hi,
How producer and consumer identify the leader in Kafka.
Thank you.
Created 12-19-2017 08:51 PM
via zookeeper query or bootstraping. the information is stored in zookeeper per topic.
Created 01-16-2018 01:06 PM
Created 01-19-2018 07:16 AM
@Nilesh within the zookeeper the leader is given at this path:
/brokers/topics/<<topicname>>
at this path a value named 'partitions' is available, providing key value pairs of
<<partition id>> : <<broker id (of leader)>>
To identify the connection parameter for the broker id, check at the path
/brokers/ids/<<broker id>
the attributes "host", "port" and "endpoints", where endpoints is a multivalue and can contain more than one endpoint.
Created 05-21-2018 12:14 PM
Since Kafka version 0.9, Producers and consumers fetch all metadata details from Kafka brokers directly and Kafka brokers are in sync with Zookeeper. Each Kafka brokers have information about leader.