A distributed event bus library for TypeScript and JavaScript, built on Redis Streams. Version 1.12.1 supports event versioning, metadata, validation, and a fanout (1:N) pattern. It uses a modular architecture with separate components for stream management, publishing, consumer groups, and logging. The library is designed for high-performance event distribution with consumer groups for reliable message delivery and load balancing. Key differentiators include built-in validation hooks, semantic versioning for events, and optional JSONL persistence. It is actively maintained and released on npm.
npm install pp-event-busNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define a custom event with validation, configure an EventBus with Redis URL from environment, and publish an event.
Pass a Redis URL string instead of a client instance.
Use eventBus.publish(topic, event) instead of event.publish()
Always call super() and this.validate() in your custom event constructor.
Use import { Event } from 'pp-event-bus' instead of import Event from 'pp-event-bus'.Ensure totalAmount > 0 when creating the event.
Check Redis URL and ensure Redis server is reachable.