Add Ruby implementation of Kafka's partition hasher (based on key). Test
that it matches results from Java.
Not hooked up yet (future commits), but can already be used manually by a client.
Use case is to pick the partition where one knows a certain class of keys will be found.
It's interesting to note the C client (librdkafka) uses a different partition hasher to the java client. I think that the C client implementation is the same as the one in Poseidon. It would still be nice to have this, though.
@Ben-M thanks for the notice. I don't know why rdkafka chose to go that route, given that "similar in spirit" doesn't seem to actually match the Scala.
In any event, for code interacting with the Java client something of this nature is needed. Note that I haven't hooked it up as any kind of default; in my code I instantiate one explicitly to compute partitions. I suppose it could be renamed to JavaCompatibleHasher if we're concerned about confusion.
I encoutered the same problem "All checks have failed", and even the details are the same. Do you have any idea to solve this problem?