Project
rabbitmq-resilience
An open-source TypeScript library that adds resilience to RabbitMQ message handling in Node.js, published on npm.
The problem
Message consumers fail in production for reasons that rarely have to do with the message itself: broker blips, transient downstream errors, poison messages and event tables that keep growing. Reimplementing retries, dead-lettering and recovery in every service duplicates code and hides failures.
Overview
A reusable library that wraps RabbitMQ consumers with immediate and delayed retries, retry and dead-letter queues, event republishing and reprocessing by UUID, SMTP alerts for dead-lettered events, configurable table rotation and an HTTP/WebSocket surface for inspecting and replaying events.
What it does
- Immediate and delayed retries with configurable attempt counts and delay.
- Dedicated retry and dead-letter queues, so failed events are never dropped.
- Republish and reprocess events by UUID through the bundled HTTP routes.
- SMTP alerts when an event reaches the dead-letter queue.
- Configurable table rotation by record count, size or age, with optional SFTP offload.
- HTTP routes and a WebSocket manager shipped with the package.
Install
npm install rabbitmq-resilience