The BullMQ queue system is optional. The application will work with or without Redis.
- ✅ Background job processing
- ✅ Automatic retries on failure
- ✅ Concurrent action execution
- ✅ Job monitoring and tracking
- ✅ Better reliability and scalability
⚠️ Direct action execution (blocking)⚠️ No automatic retries⚠️ Sequential processing⚠️ No job tracking⚠️ Poller can be blocked by slow HTTP calls
With Redis:
[INFO] Connected to MongoDB
[INFO] BullMQ queue system enabled
[INFO] BullMQ worker started { concurrency: 5 }
[INFO] Event poller worker starting { queueEnabled: true }
[INFO] Server started successfully { queueEnabled: true }
Without Redis:
[INFO] Connected to MongoDB
[WARN] BullMQ worker initialization failed - queue system disabled
[WARN] Queue system unavailable - actions will be executed directly
[INFO] Event poller worker starting { queueEnabled: false }
[INFO] Server started successfully { queueEnabled: false }
With Redis:
// Action is enqueued and processed by worker
await enqueueAction(trigger, eventPayload);
// Returns immediately, worker processes in backgroundWithout Redis:
// Action is executed directly (blocking)
await executeTriggerActionDirect(trigger, eventPayload);
// Waits for HTTP call to completeWith Redis:
GET /api/queue/stats- Returns queue statisticsGET /api/queue/jobs- Returns job listPOST /api/queue/clean- Cleans old jobsPOST /api/queue/jobs/:id/retry- Retries failed job
Without Redis:
- All
/api/queue/*endpoints return503 Service Unavailable - Response includes helpful message about Redis requirement
Yes, you can safely push this code without installing Redis:
- ✅ Code compiles and runs
- ✅ Server starts successfully
- ✅ Poller works (direct execution mode)
- ✅ All existing features work
- ✅ No breaking changes
Install Redis when you need:
- High reliability (automatic retries)
- Better performance (concurrent processing)
- Scalability (handle more triggers)
- Observability (job monitoring)
- Production deployment
# macOS
brew install redis
brew services start redis
# Ubuntu/Debian
sudo apt-get install redis-server
sudo systemctl start redis
# Windows (Docker)
docker run -d -p 6379:6379 redis:alpineUse a managed Redis service:
- AWS: ElastiCache for Redis
- Azure: Azure Cache for Redis
- GCP: Memorystore for Redis
- Heroku: Heroku Redis
- Railway: Railway Redis
- Render: Render Redis
Add to .env when Redis is available:
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PASSWORD=
WORKER_CONCURRENCY=5If these variables are missing, the app uses fallback mode.
# Start server (no Redis needed)
npm start
# Create a trigger
curl -X POST http://localhost:5000/api/triggers \
-H "Content-Type: application/json" \
-d '{
"contractId": "CTEST",
"eventName": "test",
"actionType": "webhook",
"actionUrl": "https://webhook.site/your-url"
}'
# Trigger will execute directly when event is detected- Install Redis
- Add Redis config to
.env - Restart server
- Queue system automatically activates
No code changes needed!
# Deploy code
git push origin main
# Test basic functionality
# Add Redis later when needed# Provision Redis instance
# Configure environment variables
# Deploy code
git push origin main# Deploy to staging without Redis
# Test functionality
# Add Redis to staging
# Verify queue system works
# Deploy to production with RedisCheck if queue is enabled:
curl http://localhost:5000/api/healthLook for queueEnabled in server logs.
- ✅ Safe to push without Redis
- ✅ No breaking changes - app works in both modes
- ✅ Graceful degradation - falls back to direct execution
- ✅ Easy upgrade - just add Redis and restart
⚠️ Production recommendation - use Redis for reliability
The queue system is a performance enhancement, not a requirement.