incubator-kafka-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Neha Narkhede (Commented) (JIRA)" <>
Subject [jira] [Commented] (KAFKA-238) add a getTopicMetaData method in broker and expose it to producer
Date Tue, 24 Jan 2012 20:50:40 GMT


Neha Narkhede commented on KAFKA-238:

It was intentional. The zk dependency removal and wiring getMetadata in the producer go hand-in-hand.
It will be part of KAFKA-239, but that is blocked by KAFKA-253
> add a getTopicMetaData method in broker and expose it to producer 
> ------------------------------------------------------------------
>                 Key: KAFKA-238
>                 URL:
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Jun Rao
>            Assignee: Neha Narkhede
>         Attachments: kafka-238-v1.patch, kafka-238-v2.patch, kafka-238-v3.patch
> We need a way to propagate the leader and the partition information to the producer so
that it can do load balancing and semantic partitioning. One way to do that is to have the
producer get the information from ZK directly. This means that the producer needs to maintain
a ZK session and has to subscribe to watchers, which can be complicated. An alternative approach
is to have the following api on the broker.
> TopicMetaData getTopicMetaData(String: topic)
> TopicMetaData {
>   Array[PartitionMetaData]: partitionsMetaData
> }
> PartitionMetaData {
>   Int: partitionId
>   String: leaderHostname
>   Int: leaderPort
> }
> Using this api, the producer can get the metadata about a topic during initial startup
or leadership change of a partition.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message