[go: nahoru, domu]

Skip to content

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

Notifications You must be signed in to change notification settings

vuza/murmur2-partitioner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages