joekiller/logstash-kafka — pull request #29 by pablete (2014-07-24 18:51:18+00:00)
Title: [BUG FIX] Added a random hash key based on the event

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