0.1.1 • Published 9 months ago

@xeotekofficial/topic-partition-calculator v0.1.1

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

TopicPartitionCalculator

The Topic Partition Calculator allows you to calculate the number of Apache Kafka Topics for a given use case.

Installation

Using npm:

$ npm i --save @xeotekofficial/topic-partition-calculator

Usage

In project:

import { 
  calculateRecommendedNumberOfPartitions, 
  TPCNumberOfPartitionsInputs 
} from '@xeotekofficial/topic-partition-calculator';

function someFn({ T, P, C, B }: TPCNumberOfPartitionsInputs) {
  const results = calculateRecommendedNumberOfPartitions({ T, P, C, B });
  return `Recommended number of partitions: ${results}`;
}

Demo

To view the demo app run:

$ git clone https://github.com/Xeotek/TopicPartitionCalculator.git
$ cd TopicPartitionCalculator
$ npm install
$ npm run demo

Then open http://localhost:4200/ inside your browser.

See the package source for more details.