Closed vmaurin closed 6 years ago
Also, I have tried to force the partitioner and I am not getting the same partition as the kafka java driver for example
hi @vmaurin thanks for the feedback and thanks for the hint! i just pushed a commit to pass the partitioner
argument along, would you mind testing it? to get the latest version:
go get -u github.com/fgeller/kt
Thx for the quick fix. Partitioner option is taken in account now
For the mismatch with java partitioner, it seems it is using a different hashing algorithm https://github.com/apache/kafka/blob/trunk/clients/src/main/java/org/apache/kafka/clients/producer/internals/DefaultPartitioner.java
Not having the same behavior is not really a "bug", but it will end with unexpected result if both kt and a standard kafka producer are used to produce on the same topic (no proper log compaction, unordered read for the same key)
closing this for now, will document more details on #74 for the partitioner issue
The -partitioner option for producer doesn't seem to have any effect. It sounds it is not passed properly to the cmd object in this section of the code