npm.io
0.1.1 • Published 3 years ago

@xeotekofficial/topic-partition-calculator

Licence
ISC
Version
0.1.1
Deps
10
Size
25 kB
Vulns
17
Weekly
0
Stars
4

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.

Keywords