ioredis-streams is a lightweight Node.js library (v2.0.0) that wraps ioredis to provide event-driven handling of Redis Streams. It allows developers to easily consume and process stream entries using event emitters, simplifying the typical polling or blocking read pattern. The library is TypeScript-ready with included types and is designed for real-time data pipelines. Compared to raw ioredis usage, it reduces boilerplate by automatically handling stream consumer groups, acknowledgments, and error recovery. It targets active development with a focus on stream ingestion and processing use cases. Key differentiators include its event-driven API and integration with ioredis's connection management.
npm install ioredis-streamsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a StreamProcessor, listen for data events, acknowledge entries, and handle graceful shutdown.
Use import syntax or switch to a bundler that supports ESM.
Always attach 'error' listener before start().
Create the consumer group manually (XGROUP CREATE) before initializing processor.
Use 'data' event instead of 'message'.
Call entry.ack() after successful processing.
Run XGROUP CREATE mystream mygroup $ MKSTREAM in Redis CLI before starting processor.
Change to import { StreamProcessor } from 'ioredis-streams'.Use import syntax or set type: 'module' in package.json.