Neha,

My test was failing because I was explicitly sending a key that was
hashed to the second partition and I wrote a consumer that was
fetching messages from that partition to verify the behavior.

Using the logic you just provided me, I corrected my test:

https://github.com/ewhauser/flume-kafka-plugin/blob/master/src/test/java/org/apache/flume/kafka/TestKafaSink.java

The first message indeed goes to partition 0 and the second message to
partition 1 (lines 64-69).

Thanks for the explanation.

Reply via email to