@bluexlab/kafka-ts
v1.0.4
Published
The kafka producer and consumer client
Downloads
36
Readme
BlueX Kafka
Custom Kafka client for internal use at BlueX Trade.
Quick start
Try running consumer with
npm run example:consumer
And the producer
npm run example:producer
The producer will send a example message, and you should be able to see the consumer receiving it.
Tests
Unit tests
This only tests some utility functions to guarantee their consistent behaviors.
npm run test:unit
Integration tests
This tests the entire workflow from starting the producer and the consumer, then produces a message and verify that the consumer did receive the message.
NOTE: Integration test requires you to have a kafka service running at
localhost:9092
. You could also set theNOTIFICATION_BROKERS
environment variable in the.env.test
to point to your kafka server.
npm run test:integration