A lightweight npm library for KafkaJS message reprocessing
Demo and Docs »
Kafka Cascade is a lightweight npm library for KafkaJS, a modern Apache Kafka client for Node.js.
Kafka Cascade wraps around KafkaJS objects to provide a user-configurable service for reprocessing messages, allowing developers to decide how to handle retries and when messages should be sent to the dead letter queue (DLQ).
KAFKA is a registered trademark of The Apache Software Foundation. Kafka Cascade has no affiliation with and is not endorsed by The Apache Software Foundation. Kafka Cascade was developed separately from KafkaJS and is not affiliated with KafkaJS
- Retry Strategies
- Fast Retry - a default strategy that will resend messages as quickly as the runtime will allow, up to a user-defined limit
- Timeout Retry - specifies how long to wait before resending a message based on retry level
- Batching Retry - specifies how many messages the producer should wait for before sending all of the messages to be retried at once
- All retry strategies are user-configurable
npm install kafka-cascade
# yarn add kafka-cascade
KafkaJS objects should be wrapped in the Kafka Cascade CascadeService. The user will provide the topic, groupId, and the callbacks to be invoked upon successfully delivery a message or when a message ends up in the DLQ. For more details, please see the documentation.
var service: Cascade.CascadeService;
service = await cascade.service(kafka, topic, groupId, serviceCB, successCB, dlqCB)