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

@wuyuchentr/message-broker-lite

v1.0.0

Published

Lightweight AMQP 0-9-1 compatible message broker for embedded scenarios. Drop-in RabbitMQ replacement that runs as a node_module.

Readme

@wuyuchentr/message-broker-lite

Lightweight AMQP 0-9-1 compatible message broker for embedded scenarios. A RabbitMQ reimplementation in pure Node.js that runs as a node_module — no separate RabbitMQ installation needed.

Install

npm install -g @wuyuchentr/message-broker-lite

Quick start

# Start broker on default port 5672
message-broker-lite

# With disk persistence
message-broker-lite --data ./data

# Custom port
message-broker-lite --port 5672

Connect from any AMQP client (e.g. amqplib):

const amqp = require('amqplib');

async function main() {
  const conn = await amqp.connect('amqp://localhost:5672');
  const ch = await conn.createChannel();

  await ch.assertQueue('my-queue');
  await ch.bindQueue('my-queue', '', 'my-key');

  ch.consume('my-queue', msg => {
    console.log('Received:', msg.content.toString());
    ch.ack(msg);
  });

  ch.sendToQueue('my-queue', Buffer.from('hello'));
}

Usage as a library

const { createBroker, start } = require('@wuyuchentr/message-broker-lite');

// Embedded in your app
async function main() {
  const { broker, server } = await start({ port: 5672 });
  console.log('Broker running on port 5672');
}

API

createBroker(options)

Create a broker without starting the server.

| Option | Default | Description | |--------|---------|-------------| | port | 5672 | TCP port | | host | 0.0.0.0 | Bind address | | heartbeat | 60 | Heartbeat interval (seconds) | | channelMax | 2047 | Maximum channels | | frameMax | 131072 | Maximum frame size (bytes) | | persistenceDir | null | Directory for disk persistence (null = in-memory only) |

start(options)

Create and start the broker. Returns { broker, server }.

server.close()

Gracefully stop the broker.

Exchange types

| Type | Routing | |------|---------| | direct | Exact routing key match | | topic | Pattern match with * (word) and # (multi-word) wildcards | | fanout | Delivers to all bound queues | | headers | Matches on message header properties with x-match |

Persistence

Messages, queues, exchanges, and bindings are persisted to disk when persistenceDir is set. Data is recovered on restart. Uses JSON line-delimited files (no native dependencies).

Protocol support

  • AMQP 0-9-1
  • Connection negotiation (PLAIN auth)
  • Channel multiplexing (up to channelMax)
  • Exchange declare / delete / bind / unbind
  • Queue declare / delete / bind / unbind / purge
  • Publish / consume / ack / nack / reject
  • Basic QoS (prefetch)
  • Transaction support (select / commit / rollback)
  • Heartbeat

License

MIT