Bridge-MQ is a next-generation task queue system that combines the best features of BullMQ while addressing its limitations and adding powerful new capabilities.
- π FIFO & LIFO Ordering - Configurable queue ordering
- β‘ High Performance - Non-polling architecture, optimized for both micro and long-running tasks
- βοΈ Serverless Ready - Supports Lambda, Vercel, and containerized environments
- π¦ Bulk Operations - Efficient batch enqueue/delete
- π Rate Limiting - Global and per-job rate controls
- ποΈ Multiple Storage Backends - Redis, File-based (LevelDB)
- πΎ File-Based Storage - No Redis required for local development
- π SQL Support - PostgreSQL and SQLite backends
- π runAt Scheduling - Execute jobs at specific timestamps
- β° Advanced Scheduling - Delayed, absolute time (runAt), and cron-based jobs
- π Smart Retries - Exponential, linear, or custom backoff strategies
- π§© Job Flows - Parent-child dependencies and complex workflows
- π Dead Letter Queue - Automatic handling of failed jobs
- π Cross-Language Support - Node.js, Python, Go SDKs
- π Built-in Dashboard - Real-time monitoring and metrics
- π Enhanced Monitoring - Prometheus metrics, OpenTelemetry integration
- π 100% Open Source - All features available freely
npm install bridge-mqconst { BridgeMQ } = require('bridge-mq');
// Using Redis (default)
const bridge = new BridgeMQ({
storage: {
type: 'redis',
host: 'localhost',
port: 6379
}
});
// Or use file-based storage (no Redis needed!)
const bridgeLocal = new BridgeMQ({
storage: {
type: 'file',
path: './data/queues'
}
});
await bridge.connect();
// Add a job
const queue = bridge.queue('emails');
await queue.add('send-welcome', {
to: '[email protected]',
template: 'welcome'
});
// Process jobs
const worker = bridge.createWorker('emails', async (job) => {
console.log('Processing:', job.data);
await sendEmail(job.data);
return { sent: true };
});
await worker.start();// Run 2 hours from now
await queue.add('reminder', { userId: 123 }, {
delay: 2 * 60 * 60 * 1000 // 2 hours
});// Run at specific time
await queue.add('report', { reportId: 456 }, {
runAt: new Date('2025-10-27T09:00:00Z')
});
// Or use timestamp
await queue.add('backup', {}, {
runAt: Date.now() + (24 * 60 * 60 * 1000) // Tomorrow
});// Every 6 hours
await queue.add('sync-data', {}, {
repeat: {
pattern: '0 */6 * * *',
limit: 100 // Stop after 100 executions
}
});const bridge = new BridgeMQ({
storage: {
type: 'redis',
host: 'localhost',
port: 6379,
password: 'secret'
}
});const bridge = new BridgeMQ({
storage: {
type: 'postgres',
connectionString: 'postgresql://user:pass@localhost/bridgemq'
}
});const bridge = new BridgeMQ({
storage: {
type: 'sqlite',
filename: './bridge.db'
}
});const bridge = new BridgeMQ({
storage: {
type: 'file',
path: './data/queues'
}
});const flow = await bridge.createFlow('process-order');
await flow
.add('validate-payment', { orderId: 123 })
.then('reserve-inventory', { orderId: 123 })
.then('send-confirmation', { orderId: 123 })
.catch('refund-payment', { orderId: 123 })
.execute();const worker = bridge.createWorker('api-calls', handler, {
rateLimit: {
max: 100, // 100 jobs
duration: 60000 // per minute
}
});# Start built-in dashboard
bridgemq dashboard --port 3000Visit http://localhost:3000 for real-time queue monitoring.
# List all queues
bridgemq list
# Show queue stats
bridgemq stats [queue]
# Real-time monitoring
bridgemq monitor
# Pause/Resume queues
bridgemq pause <queue>
bridgemq resume <queue>
# Clear jobs
bridgemq clear <queue> --completed --failed
# Start dashboard
bridgemq dashboard
# Export metrics
bridgemq metrics --format prometheus- Getting Started Guide
- API Reference
- Advanced Features
- Storage Backends
- Job Flows & Workflows
- Monitoring & Observability
- Serverless Deployment
- Migration from BullMQ
| Feature | Bridge-MQ | BullMQ |
|---|---|---|
| Multiple Storage Backends | β Redis, SQL, File | β Redis only |
| runAt (Absolute Time) | β Yes | β No |
| FIFO/LIFO Ordering | β Yes | |
| Built-in Dashboard | β Yes | β Separate package |
| Dead Letter Queue | β Built-in | |
| Serverless Support | β Native | |
| File-based Storage | β Yes | β No |
| All Features Free | β Yes |
We welcome contributions! See CONTRIBUTING.md for guidelines.
MIT - See LICENSE file
