A small Redis subscription wrapper for Node.js that simplifies subscribing to Redis channels. Version 1.0.0 is stable but unmaintained since 2013. It wraps the `redis` npm package v0.8.2, providing an event emitter interface for channel subscriptions. Unlike more modern alternatives like ioredis or node-redis v4, this package is outdated and lacks support for newer Redis features, TLS, and clustering. It requires manual connection handling and does not include automatic reconnection logic.
npm install redis-subNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Redis subscription client, listens to the 'ducks' channel, publishes a message, and removes the listener after 5 seconds.
Upgrade to a maintained alternative like 'ioredis' or 'redis' v4.
Always instantiate with 'new redisPubSub(options)' or use the factory pattern from the docs.
Implement your own error handling by listening to the subClient's 'error' event.
Migrate to actively maintained libraries like 'ioredis' or the official 'redis' v4.
Run 'npm install redis-sub' or correct the require path to 'redis-sub'.
Use 'new redisPubSub({})' instead of redisPubSub({}).Ensure Redis is running and options like host/port are correct. Listen for 'connect' event on subClient.