npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bsb/events-rabbitmq

v9.6.59

Published

RabbitMQ events plugin for BSB - distributed event bus using RabbitMQ

Readme

@bsb/events-rabbitmq

RabbitMQ events plugin for BSB that provides a distributed event bus using AMQP. It enables communication between multiple processes, containers, and microservices with reliable delivery and advanced routing.

Key Features

  • Distributed event bus across multiple processes and containers
  • Full support for all BSB event patterns (fire-and-forget, request-response, broadcast, streaming)
  • RabbitMQ cluster support with automatic reconnection
  • Reliable message delivery with acknowledgments
  • Configurable prefetch for load balancing
  • Platform isolation with multi-tenancy support
  • Unique client identification for routing

Installation

npm install @bsb/events-rabbitmq

Configuration

Add the plugin to your BSB configuration file:

plugins:
  events:
    plugin: "@bsb/events-rabbitmq"
    enabled: true
    config:
      endpoints:
        - "amqp://localhost:5672"
      credentials:
        username: "guest"
        password: "guest"
      prefetch: 10
      fatalOnDisconnect: true
      platformKey: null
      uniqueId: null

Configuration Options

| Option | Description | Default | |--------|-------------|---------| | endpoints | Array of RabbitMQ server URLs (cluster support) | ["amqp://localhost"] | | credentials.username | RabbitMQ username | guest | | credentials.password | RabbitMQ password | guest | | prefetch | Messages to prefetch per consumer | 10 | | fatalOnDisconnect | Exit process on connection loss | true | | platformKey | Isolate multiple BSB platforms on same RabbitMQ | null | | uniqueId | Static client ID (uses hostname if not set) | null |

Usage

Once configured, the plugin provides the same API as events-default, but distributed across RabbitMQ.

Fire-and-Forget

await this.events.emitEvent("order.created", {
  orderId: "12345",
  items: [{ sku: "ABC", qty: 2 }]
});

Request-Response

const result = await this.events.emitEventAndReturn(
  "user.validate",
  { email: "[email protected]" },
  5000
);

Broadcast

await this.events.emitBroadcast("cache.invalidate", { keys: ["a", "b"] });

Streaming

const streamId = await this.events.receiveStream("file.upload", handler, 30);
await this.events.sendStream("file.upload", streamId, fileStream);

RabbitMQ Setup

For local development, the RabbitMQ management image is a quick start:

docker run -d --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:management

Documentation

Detailed documentation (used by the BSB Registry): https://github.com/BetterCorp/better-service-base/blob/master/plugins/nodejs/events-rabbitmq/docs/plugin.md

Links

  • GitHub: https://github.com/BetterCorp/better-service-base/tree/master/plugins/nodejs/events-rabbitmq
  • BSB Registry (package): https://io.bsbcode.dev/packages/nodejs/@bsb/events-rabbitmq

License

(AGPL-3.0-only OR Commercial)