JSPM

murmur2-partitioner

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 535
  • Score
    100M100P100Q105769F
  • License ISC

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

Package Exports

  • murmur2-partitioner

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (murmur2-partitioner) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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