⚡ Zero infrastructure · Pure Node.js · Open Source

Message QueueThat Just Works.

Partition-based routing. Wildcard topic filters. Three delivery guarantees. Run on 1 server or 50 — same binary, same .env.

npm versionnpm downloadsMIT LicenseTypeScript
View on GitHub →
Zero dependencies
< 5MB install
TypeScript native
MIT License
terminal — msqe
3 Protocols
Partitions · Routing · QoS
Zero deps
Pure Node.js
1→∞ nodes
Elastic cluster
< 10s
Leader election

Enterprise messaging. Zero complexity.

No JVM. No ZooKeeper. No Docker required. Just npm install.

Topic Partitions

Messages hash to consistent partitions via routing key. Same key = same partition = strict ordering guaranteed.

// Always partition 2 for "user.india.*"
await publisher.send('orders', data, {
  routingKey: 'user.india.upi',
  qos: 1
})

Wildcard Routing

RabbitMQ-style topic routing. * matches one word, # matches zero or more words in the routing key.

const sub = new Subscriber({
  urls: ['ws://localhost:9090'],
  topics: ['order.india.#']
  // Matches: order.india.upi
  //          order.india.card.visa
})

3 QoS Levels

Choose delivery guarantee per message. Fire-and-forget for metrics, exactly-once for payments.

// qos 0: fire & forget
publisher.publish('metrics', cpu, { qos: 0 })
// qos 1: at-least-once
await publisher.send('orders',  data, { qos: 1 })
// qos 2: exactly-once
await publisher.send('payment', data, { qos: 2 })

Consumer Groups

Competing consumers with load balancing. Only ONE subscriber in a group receives each message — guaranteed.

// 3 workers - each order processed once
['w1','w2','w3'].forEach(() => {
  const sub = new Subscriber({
    topics: ['orders'],
    groupId: 'fulfilment'
  })
})

Dead Letter Queue

Failed messages auto-move to DLQ after N retries. One-click retry from dashboard or via REST API.

Settings.configure({
  retryLimit: 3,
  ackTimeout: 5000,    // 5s per attempt
  dlqTopic: '__dlq__'  // auto-routing
})

Client-Side Failover

Pass an array of URLs. The client automatically hunts for the active leader and handles offline buffering during reconnects.

const pub = new Publisher({
  urls: [
    'ws://node-1:9090',
    'ws://node-2:9090'
  ],
  autoReconnect: true
})

How MSQE Works

Publisher sends → Broker partitions, persists, replicates → Subscriber consumes & acks

Publisher
Node.js / WS
MSQE Broker
Topic: orders
Partition: 0,1,2,3
Persistence: logs/
Group A
Competing
Group B
Wildcard
1

Publish

Publisher connects via WebSocket to port 9090. Sends typed payload with topic, routingKey, QoS.

2

Route & Partition

Broker hashes routingKey → partition number. Assigns monotonic offset. Persists to append-only log.

3

Replicate

In cluster mode: leader replicates to quorum of followers before ack. Quorum = ⌊N/2⌋+1.

4

Deliver & Ack

Subscriber receives message. Sends ack within ackTimeout. On timeout: retry then → DLQ.

Interactive

Live Demo

See MSQE in action — interactive code playground and live visualization

publisher.ts
import { Publisher } from 'msqe-client'

const publisher = new Publisher({
  urls: ['ws://localhost:9090'],
  autoReconnect: true,
})

// QoS 1 — await acknowledgment from broker
const ack = await publisher.send('orderCreated', {
  orderId: 'ORD-001',
  customer: 'Alice',
  amount: 1500,
  currency: 'INR'
}, { qos: 1, routingKey: 'order.india.upi' })

console.log('Acknowledged:', ack)
Live Engine
Publisher
User Service
Broker
PartitionP-0
QoSLevel 1
Subscriber
Payment API
Live Message Log
Waiting for engine to start...

Get Running in 60 Seconds

Three deployment modes. Same binary. Only .env changes.

1

Clone & Install

Clone the repo and install all dependencies with one command.

git clone https://github.com/Sayyed-Mohammad-Adil/msqe-enterprise
cd msqe-enterprise
npm run install:all
2

Start Everything

One command starts both the broker and the dashboard UI.

npm run dev

Setup Wizard

Open localhost:3000 in your browser. A guided setup wizard will appear on first launch.

MSQE Setup ●●○○Step 1 of 4
Create Admin Account
Username:admin
Password:••••••••
[ Back ][ Next ]

Port Reference

ServicePortProto
Dashboard3000HTTP
Admin API8081REST
Broker9090WS
4

Publish Your First Event

Install the client and send your first event using the Promise-based API.

npm install msqe-client

import { Publisher } from 'msqe-client'
const publisher = new Publisher({ urls: ['ws://localhost:9090'] })
await publisher.send('hello', { msg: 'It works!' })

Built for Reliability

Crash one server. The others don't miss a beat.

Follower Goes Down

T0

Node B (follower) crashes

T1

Leader continues serving — no interruption

T2

New messages write to Node A (leader) only

T3

Node B restarts

T4

Node B calls /internal/sync → gets missed data

T5

Node B fully synced, back as follower

0 messages lost · 0 downtime

Leader Goes Down

T0

Node A (leader ★) crashes

T1

Followers miss heartbeats (~9 seconds)

T2

Bully Algorithm election triggered

T3

Node B (highest ID) becomes leader ★

T4

Traffic re-routes to Node B

T5

Node A restarts → joins as follower

~9s election · 0 messages lost

Full Restart

T0

All nodes go down (deploy/reboot)

T1

Nodes start with Split-Brain prevention jitter

T2

First node pings peers → no response

T3

Bully Algorithm declares highest ID = leader

T4

Others join as followers

T5

Queue rebuilt from append-only logs

Full recovery · Offset-based replay

Quorum Replication & Sync

MSQE guarantees consistency through Quorum Replication. QoS 1 & 2 messages are synchronously replicated to a majority of nodes before confirmation. When a follower rejoins, it syncs its missing monotonic offsets directly from the leader's append-only logs.

1
2
3
Read Disk

Read last known offset from local .log files.

Request Delta

Call /internal/sync?fromOffset=N to the leader.

Append Log

Write received messages to local disk and rejoin.

follower-sync.ts
// Follower on restart
const myLastOffset = fileManager.getLastOffset()
// e.g. 49

// Request missing data from leader
const delta = await api.get('/internal/sync', {
  fromOffset: 50,
  limit: 500
})

// Write to local disk
for (const msg of delta) {
  fileManager.append(msg)
}

// ✓ Fully synced

MSQE vs Messaging Systems

Built for realtime distributed systems without enterprise-level infrastructure complexity.

Feature
⚙ Infrastructure & Setup
Setup time
< 2 min
10-20 min
15-30 min
1-4 hrs
5-10 min
Infrastructure
Node.js only
Redis server
Erlang + Broker
JVM Cluster
Broker required
Memory footprint
~30 MB
~100 MB
~150 MB
>1 GB
~50 MB
Docker support
📨 Messaging Features
Topic partitions
Wildcard routing
QoS delivery
Consumer groups
Dead letter queue
Replay support
🔒 Reliability & Security
High availability
Leader election
Persistence
Dashboard
RBAC/Auth
TypeScript DX

Best Fit for MSQE

Realtime APIs, distributed Node.js services, internal event buses, multiplayer infra, IoT systems and lightweight microservice orchestration.

When RabbitMQ Wins

Enterprise queue pipelines, mature AMQP workflows and traditional broker-based architectures.

When Kafka Wins

Massive-scale event streaming with multi-terabyte retention, analytics pipelines and platform engineering teams.

Free. Open Source. Forever.

MIT License. Self-host on your own servers. Full source on GitHub. No vendor lock-in.

npm versionnpm downloadsMIT LicenseTypeScript
MIT License

Use in commercial projects, redistribute, and modify without any restrictions.

npm Package

Available as a lightweight npm package. Integrate with any Node.js microservice.

Self-Host

Own your infrastructure. Deploy to any VPS, cloud provider, or bare metal server.

Docker Ready

Official Docker image. Single container or multi-node compose cluster. One command to deploy.

Star on GitHub
$npm install msqe-client

Designed & Built by

SM
Sayyed Mohammad Adil
Creator · MSQE Engine · CSND Project