High Performance
Handle 200K+ messages/sec with proper batching. Built with C++17, uWebSockets, and async PostgreSQL for minimal latency.
High-performance, feature-rich message queue system with unlimited FIFO partitions, consumer groups, transactions, and streaming capabilities

π¨ Born from Real Production Needs
Queen was created at Smartness to power Smartchat - an AI-powered guest messaging platform for the hospitality industry.
At Smartness, we use Kafka extensively across our infrastructure and know it well. For Smartchat's message backbone, we initially chose Kafka for its strong reliability guarantees.
However, we encountered a use case mismatch: in Kafka, a single message processing delay affects the entire partition. For most workloads this isn't an issue, but our system involves:
With potentially 100,000+ concurrent chats, we would need a Kafka partition for each chat conversation - which isn't practical at that scale.
We started moving long-running operations to custom PostgreSQL queue tables. As we built out the system, we needed:
We realized we had built a complete message queue system that better fit our specific requirements.
Queen now handles Smartchat's message infrastructure:
Queen processes 100,000+ messages daily in production.
Technical Note
If you're building systems where message processing has inherently variable latency (chat systems, AI pipelines, human-in-the-loop workflows), Queen's partition model may be a better fit than traditional streaming platforms.
import { Queen } from 'queen-mq'
// Connect
const queen = new Queen('http://localhost:6632')
// Create queue with configuration
await queen.queue('orders')
.config({ leaseTime: 30, retryLimit: 3 })
.create()
// Push messages with guaranteed order per partition
await queen.queue('orders')
.partition('customer-123')
.push([{ data: { orderId: 'ORD-001', amount: 99.99 } }])
// Consume with consumer groups for scalability
await queen.queue('orders')
.group('order-processor')
.concurrency(10)
.batch(20)
.autoAck(false)
.each()
.consume(async (message) => {
await processOrder(message.data)
})
.onSuccess(async (message) => {
await queen.ack(message, true, { group: 'order-processor' })
}).onError(async (message, error) => {
await queen.ack(message, false, { group: 'order-processor' })
})| Feature | Queen | RabbitMQ | Kafka | Redis Streams |
|---|---|---|---|---|
| FIFO Partitions | β Unlimited | β | β Limited | β Limited |
| Consumer Groups | β | β οΈ Manual | β | β |
| Transactions | β Atomic | β οΈ Complex | β οΈ Limited | β |
| Long Polling | β Built-in | β | β | β |
| Dead Letter Queue | β Automatic | β | β οΈ Manual | β |
| Message Replay | β Timestamp | β | β | β |
| Persistence | β PostgreSQL | β Disk | β Disk | β οΈ Memory |
| Distributed Cache | β UDPSYNC | β | β ZooKeeper | β |
| Web Dashboard | β Modern | β οΈ Basic | β οΈ External | β |
Build reliable multi-step workflows with transactions and exactly-once delivery. Perfect for financial systems, order processing, and data pipelines.
Stream messages to multiple consumer groups for different analytics purposes. Replay historical data from any timestamp.
Decouple microservices with guaranteed message delivery. Built-in tracing helps debug distributed systems.
Distribute work across multiple workers with automatic load balancing. Long-running tasks supported with lease renewal.
Queen uses a high-performance acceptor/worker pattern with fully asynchronous, non-blocking PostgreSQL architecture:
Learn more about the architecture β
Queen was created by Smartness to power their hospitality platform. It's built with modern C++17, uses PostgreSQL for ACID guarantees, and includes a beautiful Vue.js dashboard.
π Production Ready
Queen is currently running in production, handling millions of messages daily. Version 0.8.0 is stable and ready for your projects.
# Start PostgreSQL and Queen server
docker network create queen
docker run --name postgres --network queen \
-e POSTGRES_PASSWORD=postgres -p 5432:5432 -d postgres
docker run -p 6632:6632 --network queen \
-e PG_HOST=postgres -e PG_PASSWORD=postgres \
smartnessai/queen-mq:0.8.0
# Install JavaScript client
npm install queen-mq
# Or install Python client
pip install queen-mq
# Start building!Queen MQ is released under the Apache 2.0 License.