npm.io
1.0.0 • Published 8 years ago

murmur2-partitioner

Licence
ISC
Version
1.0.0
Deps
1
Vulns
0
Weekly
0
Stars
2

murmur2 Partitioner

This JS-script calculates the partition based on a key and the amount of partitions for a JS Kafka producer in way consistent to the default Java Kafka client.

Install it

npm install

Test it

npm test

Use it

const partitioner = require('path/to/index')
partitioner.partition('key', 5) // Second parameter being the total number of partitions

Keywords