kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guozhang Wang <wangg...@gmail.com>
Subject Re: find topic partition count through simpleclient api
Date Fri, 01 Aug 2014 17:03:18 GMT
One seed broker should be enough, and the the number of partitionMetadata
should be the same as num. of partitions. One note here is that the
metadata is propagated asynchronously to the brokers, and hence the
metadata returned by any broker may be stale by small chances, so you need
to periodically pull the metadata.


On Fri, Aug 1, 2014 at 8:46 AM, Weide Zhang <weoccc@gmail.com> wrote:

> Hi,
> What's the way to find a topic's partition count dynamically using
> simpleconsumer api ?
> If I use one seed broker within a cluster of 10 brokers, and add list of
> topic name into the simple consumer request to find topics' metadata, when
> it returns,
> is the size of partitionsMetadata per topicmetadata same as the number of
> partitions for a given topic ? Also, for retrieval, do I need to have more
> than 1 seed broker to get all metadata info of a topic? Is only 1 seed
> broker enough ?
> Thanks,
> Weide

-- Guozhang

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