A toy Kafka consumer written in Typescript.
npm install
npx ts-node index.ts --group-id <GROUP ID> --client-id <CLIENT ID> --topic <TOPIC>
or
yarn install
npx ts-node index.ts --group-id <GROUP ID> --client-id <CLIENT ID> --topic <TOPIC>
Most of the core code exists in kafkaConsumerEngine.ts
.
Another entry point is index.ts
.
This consumer is developed with Hot-Module-Reloading at the core. This means most changes will not need a complete restart of the consumer. There may be some errors when HMR restarts the consumer engine, as any fetches are intercepted mid-flight and rejected.