Probably your keys are getting hashed to only those partitions. I don't think anything is wrong here. You can check how the default hashPartitioner is used in the code and try to do the same for your keys before you send them and check which partitions are those going to.
The default hashpartitioner does something like this : hash(key) % numPartitions. Thanks, Mayuresh On Mon, Mar 2, 2015 at 3:52 PM, Yang <teddyyyy...@gmail.com> wrote: > we have 10 partitions for a topic, and omit the explicit partition param in > the message creation: > > KeyedMessage<String, String> data = new KeyedMessage<String, String> > (mytopic, myMessageContent); // partition key need to be polished > producer.send(data); > > > > but on average 3--5 of the partitions are empty. > > > > what went wrong? > > thanks > Yang > -- -Regards, Mayuresh R. Gharat (862) 250-7125