@bluexlab/kafka-ts
v1.0.4
Published
The kafka producer and consumer client
Downloads
16
Readme
BlueX Kafka
Custom Kafka client for internal use at BlueX Trade.
Quick start
Try running consumer with
npm run example:consumerAnd the producer
npm run example:producerThe 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:unitIntegration 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_BROKERSenvironment variable in the.env.testto point to your kafka server.
npm run test:integration