Hi Neha,
We can not understand why the partitions will be unbalanced if each thread
gets different number of messages.
We go through the code of producer, and the partition number is generated
by "random.nextInt(numOfPartitions)", so we think even if different thread
gets different number of mess
I suspect each of the threads are not assigned equal number of messages to
send. I don't think it matter whether you use one producer or more as long
as you distribute work amongst those threads equally.
Thanks,
Neha
On Wednesday, April 17, 2013, Helin Xiang wrote:
> Hi,
> We are using kafka 0.7
Hi,
We are using kafka 0.7.2.
The situation is a little complicated:
1. We use Java API and multi-thread to send logs to kafka. (like 16
threads). Each thread contain its own kafka.javaapi.producer.Producer
object.
2. There is one topic which the partition of is set to 4. we use random
partitio