joekiller/logstash-kafka — pull request #42 by pablete (2014-11-03 21:03:20+00:00)
Title: Add message key to distribute payloads among distinct partitions

Problem:
Having nil prevented kafka to send messages to different partitions. (nil will be of no use for the partition function, ie: kafka.producer.DefaultPartitioner)

Zlib::crc32(event) uses 250ns aprox. and 'zlib' is part of the standard library, so no dependencies to load.

Reference:
http://programmers.stackexchange.com/questions/49550/which-hashing-algorithm-is-best-for-uniqueness-and-speed