A simple event bus powered by node-redis for inter-process communication between multiple Node.js instances using Redis pub/sub. Current stable version is 1.2.1. It provides a lightweight API with async/await and promise patterns, TypeScript definitions included. Differentiators include a static registry for named event bus instances, a ping method to check listener availability, and automatic cleanup. Low release cadence; last update was 2018.
npm install node-redis-eventbusNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates an event bus, listens for 'message' events, emits a message, pings listeners, and destroys the bus.
Use EventBus.create only once per name; retrieve later with EventBus.getByName.
Call `eventBus.destory()` (note the typo).
Consider migrating to a maintained alternative like ioredis-based event bus.
Ensure proper cleanup by calling destory() to avoid resource leaks.
Do not await emit(); it returns void.
Use `await EventBus.create('name')` instead.Import using `import { EventBus } from 'node-redis-eventbus'`Set environment variable REDIS_HOST or pass host in clientOpts.
Ensure at least one listener is active or increase timeout / minResponseCount.