1.0.8 • Published 2 years ago

@rocketseat/kafka-typings v1.0.8

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Kafka Typings

This package exports typings for Kafka topics and messages so we can keep a pattern of the data exchanged between the micro-services.

Usage example

import * as PlutoKafka from '@rocketseat/kafka-typings/types/pluto';
import { kafka } from 'example-kafka-client-path';

const message: PlutoKafka.SignatureCreatedMessage = {
  // this will be typed
}

kafka.emit(PlutoKafka.TOPICS.SIGNATURE_CREATED, message);

Using locally

To use this package locally, we will use yalc that works like a local store for NPM packages.

First, install yalc globally using NPM or Yarn.

yarn global add yalc
npm i yalc -g

Publish package to local store

Inside the kafka-typings folder, after changing it's code, you can:

yalc publish

This will publish the package to the local store.

Use the package inside another project

Inside the project folder, run:

yalc link @rocketseat/kafka-typings

Update the package code

You can always refresh the package code using yalc update, this will bring the latest version of the code from within the local store (this will only works after a yalc publish).

Keep it out of Git

Always remember to include yalc.lock and .yalc folder inside the .gitignore file on the project folder.

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago