Redis Streams Library for Node.js/TypeScript with full consumer group recovery. Version 1.1.5 provides Kafka-like consumer group semantics on top of Redis Streams, including automatic reclaiming of abandoned messages from failed consumers. Key differentiators include batch acknowledgment (XACK), configurable block intervals, and a dedicated reclaim loop. It exposes a Consumer class that wraps XREADGROUP, XACK, and XCLAIM commands. The library is TypeScript-friendly with bundled types. Released under MIT, with no significant recent updates indicating maintenance mode.
npm install node-redis-streamsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Redis Stream consumer group consumer, starts consuming with automatic reclaim, and handles graceful shutdown.
Ensure consumer.StartConsuming() is called.
Implement idempotent record processing or use a database to track processed record IDs.
Always call consumer.StopConsuming() before shutdown, and then quit the Redis client.
Use 'checkAbandonedIntervalMS' instead of 'checkAbandonedMS'.
Use 'StartConsuming()' instead of 'startConsuming()'.
Use named import: import { Consumer } from 'node-redis-streams' (CommonJS: const { Consumer } = require('node-redis-streams')).Ensure you pass a valid ioredis instance as 'redisClient'.
Create the consumer group using XGROUP CREATE or use a library that auto-creates groups.
Check if consumer is already started (e.g., maintain a flag) or call StopConsuming() before restarting.