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.

Guozhang


On Fri, Aug 1, 2014 at 8:46 AM, Weide Zhang <weo...@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

Reply via email to