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

msqe-client

v1.0.4

Published

High-performance Node.js client library for the MSQE Message Queue Engine.

Readme

msqe-client

npm downloads license TypeScript WebSocket Cluster

High-performance distributed messaging client built for modern Node.js systems.


🌐 Official Resources

| Resource | Link | |---|---| | Official Website | https://msqe.org | | Enterprise Broker | https://github.com/Sayyed-Mohammad-Adil/msqe-enterprise | | NPM Package | https://www.npmjs.com/package/msqe-client |


⚡ What is MSQE?

MSQE (Message Queue Events) is a distributed messaging and event-streaming platform built entirely with pure Node.js and native WebSockets.

It is designed for modern event-driven systems that require lightweight infrastructure, realtime communication, distributed clustering, and simple deployment workflows.

MSQE provides:

  • Realtime event streaming
  • Distributed clustering
  • Automatic failover support
  • Consumer groups
  • Replayable events
  • Dead letter queues (DLQ)
  • Wildcard topic routing
  • WebSocket-native communication
  • Realtime monitoring support

Built specifically for modern Node.js-native distributed architectures.


🚀 Features

⚡ Lightweight Runtime

  • Pure Node.js implementation
  • Native WebSocket transport
  • Minimal dependencies
  • Low memory footprint
  • Fast startup time
  • Simple deployment architecture

🔥 Realtime Distributed Messaging

Built for:

  • Microservices
  • Event-driven systems
  • Distributed workers
  • Analytics pipelines
  • Automation platforms
  • IoT messaging systems
  • Streaming workloads

🧠 Intelligent Failover

Pass multiple broker URLs and the client automatically:

  • Detects available brokers
  • Reconnects during outages
  • Performs automatic failover
  • Restores subscriptions
  • Resumes consumer groups

🛡 Reliability Features

  • Automatic reconnection
  • Exponential retry backoff
  • Offline buffering
  • QoS acknowledgements
  • Replay requests
  • Dead letter queue support
  • Partition-aware delivery

📦 TypeScript First

  • Full TypeScript support
  • Typed APIs
  • Async/await friendly
  • ESM-ready support

📋 Requirements

  • Node.js >= 18

📦 Installation

# npm
npm install msqe-client

# yarn
yarn add msqe-client

# pnpm
pnpm add msqe-client

⚡ Quick Start

Producer Example

import { Producer } from "msqe-client";

const producer = new Producer({
  urls: [
    "ws://127.0.0.1:9090",
    "ws://127.0.0.1:9091",
    "ws://127.0.0.1:9092"
  ],
  autoReconnect: true,
  reconnectDelay: 1000
});

producer.on("ready", async () => {
  try {
    const response = await producer.send(
      "user.signup",
      {
        userId: "user_123",
        email: "[email protected]"
      },
      {
        qos: 1
      }
    );

    console.log("Published:", response);
  } catch (error) {
    console.error("Publish failed:", error);
  }
});

producer.on("error", (error) => {
  console.error("Producer error:", error);
});

Subscriber Example

import {
  Subscriber,
  MessageEnvelope
} from "msqe-client";

const subscriber = new Subscriber({
  urls: [
    "ws://127.0.0.1:9090",
    "ws://127.0.0.1:9091",
    "ws://127.0.0.1:9092"
  ],
  topics: [
    "user.signup",
    "payments.*"
  ],
  groupId: "analytics-service",
  autoReconnect: true
});

subscriber.run({
  eachMessage: async (
    payload: any,
    envelope: MessageEnvelope
  ) => {
    console.log("Topic:", envelope.topic);
    console.log("Payload:", payload);
  }
});

subscriber.on("error", (error) => {
  console.error("Subscriber error:", error);
});

🧩 Architecture

MSQE uses WebSocket-based broker communication with distributed node coordination, consumer-group balancing, and partition-aware routing.

┌────────────┐      ┌─────────────────┐      ┌────────────┐
│ Producer A │─────▶│   MSQE Broker   │◀─────│ Producer B │
└────────────┘      └────────┬────────┘      └────────────┘
                             │
                 ┌───────────┴───────────┐
        ┌────────▼────────┐     ┌────────▼────────┐
        │  Subscriber A   │     │  Subscriber B   │
        └─────────────────┘     └─────────────────┘

🌍 Cluster Support

const producer = new Producer({
  urls: [
    "ws://node-1:9090",
    "ws://node-2:9090",
    "ws://node-3:9090"
  ]
});

Supports:

  • Multi-node clustering
  • Automatic failover
  • Distributed partitions
  • Consumer balancing
  • Replication workflows
  • Stateful recovery

📚 API Reference

Producer

new Producer({
  url?,
  urls?,
  autoReconnect?,
  reconnectDelay?
});

await producer.send(topic, payload, options);

producer.publish(topic, payload);

producer.disconnect();

Methods

| Method | Description | |---|---| | send() | Acknowledged publish | | publish() | Fire-and-forget publish | | disconnect() | Graceful shutdown |


Subscriber

new Subscriber({
  topics,
  groupId?,
  qos?,
  autoReconnect?
});

subscriber.run({
  eachMessage: async (payload, envelope) => {}
});

subscriber.requestReplay();

subscriber.disconnect();

Methods

| Method | Description | |---|---| | run() | Start consuming messages | | requestReplay() | Request historical events | | disconnect() | Graceful shutdown |


📊 Design Philosophy Comparison

| Capability | MSQE | RabbitMQ | Kafka | MQTT | |---|---|---|---|---| | Pure Node.js Runtime | ✅ | ❌ | ❌ | ❌ | | Native WebSocket Communication | ✅ | ❌ | ❌ | ⚠️ | | Lightweight Deployment | ✅ | ⚠️ | ❌ | ✅ | | Distributed Clustering | ✅ | ✅ | ✅ | ⚠️ | | Replayable Events | ✅ | ⚠️ | ✅ | ❌ | | Consumer Groups | ✅ | ✅ | ✅ | ❌ | | Simple Developer Experience | ✅ | ⚠️ | ❌ | ✅ |


🐳 Docker & Deployment

docker compose up

Supports:

  • Docker
  • Docker Swarm
  • Kubernetes
  • Multi-node orchestration

🔐 Security

MSQE supports:

  • Token-based authentication
  • Topic access control
  • Secure WebSocket (WSS)
  • Cluster-level permissions

🏃 Running the Broker

The client connects to the MSQE broker cluster.

Broker setup instructions:

https://github.com/Sayyed-Mohammad-Adil/msqe-enterprise


🛣 Roadmap

  • Kubernetes Operator
  • Persistent distributed storage
  • Multi-region replication
  • Stream processing engine
  • Admin CLI
  • GraphQL subscriptions
  • WebAssembly filters
  • Edge federation

🤝 Contributing

Contributions, issues, and pull requests are welcome.


📄 License

MIT License


👨‍💻 Author

Built by Sayyed Mohammad Adil

  • Website: https://msqe.org
  • GitHub: https://github.com/Sayyed-Mohammad-Adil/msqe-enterprise