Message QueueThat Just Works.
Partition-based routing. Wildcard topic filters. Three delivery guarantees. Run on 1 server or 50 — same binary, same .env.
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
Publish
Publisher connects via WebSocket to port 9090. Sends typed payload with topic, routingKey, QoS.
Route & Partition
Broker hashes routingKey → partition number. Assigns monotonic offset. Persists to append-only log.
Replicate
In cluster mode: leader replicates to quorum of followers before ack. Quorum = ⌊N/2⌋+1.
Deliver & Ack
Subscriber receives message. Sends ack within ackTimeout. On timeout: retry then → DLQ.
Live Demo
See MSQE in action — interactive code playground and live visualization
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)Get Running in 60 Seconds
Three deployment modes. Same binary. Only .env changes.
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:allStart Everything
One command starts both the broker and the dashboard UI.
npm run devSetup Wizard
Open localhost:3000 in your browser. A guided setup wizard will appear on first launch.
Port Reference
| Service | Port | Proto |
|---|---|---|
| Dashboard | 3000 | HTTP |
| Admin API | 8081 | REST |
| Broker | 9090 | WS |
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
Node B (follower) crashes
Leader continues serving — no interruption
New messages write to Node A (leader) only
Node B restarts
Node B calls /internal/sync → gets missed data
Node B fully synced, back as follower
Leader Goes Down
Node A (leader ★) crashes
Followers miss heartbeats (~9 seconds)
Bully Algorithm election triggered
Node B (highest ID) becomes leader ★
Traffic re-routes to Node B
Node A restarts → joins as follower
Full Restart
All nodes go down (deploy/reboot)
Nodes start with Split-Brain prevention jitter
First node pings peers → no response
Bully Algorithm declares highest ID = leader
Others join as followers
Queue rebuilt from append-only logs
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.
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 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 syncedMSQE 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.
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.
Designed & Built by