You can do a ZK get on /brokers/ids/broker_id to find out the broker host/port. You can also configure a vip for metadata.broker.list and then dynamically change the underlying hosts as brokers change. Also, you don't need to put all brokers in metadata.broker.list.
Thanks, Jun On Wed, Feb 19, 2014 at 4:35 AM, Raj Vaida <raj.vo...@gmail.com> wrote: > Hi > > I am implementing a producer. > > * ZkClient zkClient = new ZkClient(zookeeperUrl, > 40000, 60000, new BytesPushThroughSerializer());* > * List<String> brokerIdList = zkClient.getChildren("/brokers/ids");* > > I am able to get Ids of the brokers. But I couldn't figure out how to get > the urls of those brokers to set to *metadata.broker.list* > Is there any alternative way to load broker urls dynamically? > > -- > Thanks... > Raj Vaida > +91 897 775 0777 >