This npm module lets you start up a Kafka broker (including ZooKeeper) locally. It's meant to facilitate integration tests when you need to test against a Kafka broker.
You need Java in order to run Kafka. This npm module assumes that you already have Java installed.
npm install kafka-please --save-dev
const makeKafkaServer = ;;
Timeouts in mocha
Typically, starting a Kafka server takes ~2-3 seconds, and can make your mocha tests time out, if you don't override the timeout:
- git clone this project
fetch.shto download Kafka and unzip it
npm installto get dependencies
npm testwill run the integration tests.