What should I use as the key for my Kafka message?
https://forum.confluent.io/t/what-should-i-use-as-the-key-for-my-kafka-message/312
WebDec 3, 2020 · The producer first calculates a numeric hash of the key (using murmur2 if you use the java client), and then selects the partition number by the following formulae: murmur2 (key) % number_of_partitions. So, for instance, the murmur2 of the string “azerty” is 2710803828. If you have a topic of 20 partitions, 2710803828 mod 20 makes 8.
DA: 70 PA: 22 MOZ Rank: 100