kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Churu Tang <ct...@rubiconproject.com>
Subject Question concerning partitionNumber and Key
Date Thu, 06 Mar 2014 01:21:35 GMT
Hi,

I have 2 questions about the partition number and key. 
1. The produceRequest will  explicitly include a partitionNumber, and messageSet which contains
messages with key(can be NULL, used to calculate partitionNumber when specified). I am assuming
all the messages in the messageSet will be published to the partitionNumber specified. So
My question is, since the partitionNumber is explicitly specified in the produce request,
will the key still be used in calculating the partition number when the request is handled
at the server side? If so, how?

2. In the introduction, it mentioned we can customize the kafka.producer.Partitioner to influence
the routing decision. Would you please tell me where I can add my own Partitioner? I use the
kafka_2.8.0-0.8.0 binary, and the C++ client supporting kafka 0.8. 

Since I am kinda of new to Kafka, my questions might be a little trivial... Thanks for helping
out!

Cheers,
Churu
Mime
View raw message