A simple web tool to calculate the target partition for Kafka message keys using the murmur2 algorithm.
https://thiko.github.io/kafka-partition-calculator
- Enter your message key (e.g., "user123", "order-456")
- Enter the number of partitions
- View the calculated target partition
Open index.html in any web browser. No build process required.
Uses the same logic as the java clients BuiltInPartitioner:
partition = toPositive(murmur2(messageKey)) % partitionCount
- Real-time calculation
- Murmur2 hash (same as Kafka)
- Responsive design
- No dependencies
MIT