Tiny TypeScript wrapper over Redis Streams providing typed Producer and Consumer classes with an injected Redis client. Current version 0.1.4 supports Node >=18 and Redis >=6.2 for XAUTOCLAIM. Differentiators: fully typed, manual ack control, configurable concurrency, auto-claim for stale recovery, and ESM-only design. Release cadence is irregular; API is stable for basic usage but breaking changes may occur before 1.0.
npm install redis-stream-kitNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates creating Producer and Consumer with typed events, emitting a message, handling it with auto-claim, and graceful shutdown.
Implement onError to log or dead-letter; ensure handler logic does not throw unexpectedly.
Set createIfMissing: false if stream is already managed externally.
Keep an eye on releases; no immediate action needed.
Ensure all payload values are JSON-serializable; use a wrapper type if needed.
Update constructor calls to match new signature: new Producer(client, stream, options?) and new Consumer(client, stream, group, handler, options?).
Run 'npm install redis-stream-kit' and ensure import is 'redis-stream-kit' (no subpath).
Use 'import { Consumer } from 'redis-stream-kit' and instantiate with 'new Consumer(...)'.Ensure emit receives a plain object and producer is started (call await producer.start()).
Set createIfMissing: true (default) or manually create stream and group via Redis CLI.
Verify Redis is running and client configuration is correct: new Redis({ host: 'localhost', port: 6379 }).