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

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

HomePage

https://github.com/vuza/murmur2-partitioner#readme

Repository

https+https://github.com/vuza/murmur2-partitioner


上一篇:murmur-hash-js
下一篇:kafkajs

相关推荐

暂无相关文章

官方社区

扫码加入 JavaScript 社区