Skip to content

oslabs-beta/Kafka-Cascade

Repository files navigation

npm version

Kafka Cascade

A lightweight npm library for KafkaJS message reprocessing
Demo and Docs »


Table of Contents


About Kafka Cascade

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

Features

  • Retry Strategies
    1. Fast Retry - a default strategy that will resend messages as quickly as the runtime will allow, up to a user-defined limit
    2. Timeout Retry - specifies how long to wait before resending a message based on retry level
    3. 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

Getting Started

npm install kafka-cascade
# yarn add kafka-cascade

Usage

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)

Authors

About

A message reprocessing library for KafkaJS

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages