Hi, You can follow the handleMetadataRequest in KafkaApis which would trigger a topic creation if necessary. As for distribution, the leader is selected currently in a round robin manner instead of based on broker's load.
Guozhang On Tue, Apr 8, 2014 at 5:56 AM, András Serény <sereny.and...@gravityrd.com>wrote: > Hi Kafka users, > > as far as I understand, in Kafka 0.8.1 when auto topic creation is enabled > and a producer starts to publish to a new topic, a leader for this topic is > selected based on the current load on brokers. Could you please point me to > the code where this happens? > > I'd like to check the details, as when I create a new topics in rapid > succession, they do get distributed among brokers, but not quite evenly. > > Thanks a lot, > András > -- -- Guozhang