kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant Henke <ghe...@cloudera.com>
Subject Re: Lead Broker from kafka.message.MessageAndMetadata
Date Tue, 04 Aug 2015 16:17:14 GMT
Hi Sreeni,

Using the SimpleConsumer you can send a TopicMetadataRequest for a topic
and the TopicMetadataResponse will contain TopicMetadata for each topic
requested (or all) which contains PartitionMetadata for all all partitions.
The PartitionMetadata contains the leader, replicas, and isr.

Is that what you are looking for?

Thanks,
Grant

On Mon, Aug 3, 2015 at 7:26 AM, Sreenivasulu Nallapati <
sreenu.nallapati@gmail.com> wrote:

> Hello,
>
> Is there a way that we can find the lead broker
> from kafka.message.MessageAndMetadata class?
>
> My use case is simple, I have topic and partition and wanted to find out
> the lead broker for that partition.
>
> Please provide your insights
>
>
> Thanks
> Sreeni
>



-- 
Grant Henke
Software Engineer | Cloudera
grant@cloudera.com | twitter.com/gchenke | linkedin.com/in/granthenke

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message