Skip to content

natura-cosmeticos/iris-nodejs-messenger-kafka

Repository files navigation

@naturacosmeticos/iris-nodejs-messenger-kafka

Build Status semantic-release NPM

Utilities to ease the communication with Apache Kafka

Installation

# with npm
npm install --save @naturacosmeticos/iris-nodejs-messenger-kafka

# with yarn
yarn add @naturacosmeticos/iris-nodejs-messenger-kafka

How to Use

Set the following environment variable beforehand

  • KAFKA_HOST (host to specific kafka broker instance. Default: 0.0.0.0:9092)
  • KAFKA_CLIENT_ID (an id to representing kafka instance. Default: Iris)
  • KAFKA_LOG_LEVEL (log level of the log entry. Default: 0. Possible values: NOTHING=0, ERROR=1, WARN=2, INFO=4, DEBUG=5)
  • KAFKA_INITIAL_RETRY_TIME (initial value used to calculate the retry in milliseconds. Default: 300)
  • KAFKA_RETRIES (max number of retries per call. Default: 5)

To local docker test, following the commands on the root repository

docker-compose up -d

To release local test, we use Verdaccio:

After installing Verdaccio, on a terminal/console, start verdaccio process.
At another terminal/console, run the command yarn release:local. This will publish the packages locally (http://localhost:4873), which may include the dependency required for other projects, e.g.: yarn add @naturacosmeticos/iris-nodejs-messenger-kafka --registry=http://localhost:4873.

To make it easier, we use Conduktor dashboard desktop client to manage Kafka instances.

About

Utilities to ease the communication with Apache Kafka

Resources

License

Stars

Watchers

Forks

Packages

No packages published