There is no reason the ClientUtils.fetchTopicMetadata should take broker instances, that is totally unusable. I have a patch for this included in KAFKA-642.
-Jay On Mon, Dec 3, 2012 at 7:53 AM, Chris Curtin <curtin.ch...@gmail.com> wrote: > Hi, > > I was able to implement my own lookup code but have a few concerns about > this long term: > - the Broker class is marked as 'private' in the Scala code. IntelliJ gives > me an error about using it, but the runtime lets me use it and get the > host/port out. > - I have to know a lot about the structure of some internal classes for > this to work, so changes in the implementation would cause my logic to > break. > > I did a quick JIRA search and didn't see a request for a java-api for > finding the primary, is that already on the roadmap or should I submit > an enhancement request? > > Thanks, > > Chris > > > On Wed, Nov 28, 2012 at 2:08 PM, Neha Narkhede <neha.narkh...@gmail.com > >wrote: > > > <snip> > > > > Also, there are 2 ways to send the topic metadata request. One way is > > how SimpleConsumerShell.scala uses ClientUtils.fetchTopicMetadata(). > > Another way is by using the send() API on SyncProducer. > > > > Thanks, > > Neha > > > > >