Hi@akhtar,
To know leader information you can use the below command.
$ ./bin/kafka-topics.sh --zookeeper localhost:2181 --describe --topic Mytopic
Topic:Mytopic PartitionCount:3 ReplicationFactor:3 Configs:
Topic: Mytopic Partition: 0 Leader: 1 Replicas: 1,2,0 Isr: 1,2,0
Topic: Mytopic Partition: 1 Leader: 2 Replicas: 2,0,1 Isr: 2,0,1
Topic: Mytopic Partition: 2 Leader: 0 Replicas: 0,1,2 Isr: 0,1,2
Hope this helps!
To know more about Kafka, I would recommend you to enroll with Kafka training online today.
Thanks.