Always consult the Changelog before upgrading to understand the extent of changes and any special considerations.
Upgrade Strategy by Type
The approach you take depends on the type of upgrade:- Bugfix Upgrades
- New Feature Upgrades
- Breaking Changes
Version Pattern: Micro version increase (e.g.,
3.14.4 → 3.14.7)Strategy: Simple update, no special considerations1
Update your package
2
Deploy to all instances
While not critical that all instances run the same version, we recommend it for consistency.
Bugfix releases follow Semantic Versioning and contain no breaking changes or new features.
General Upgrade Advice
Recommended Upgrade Path
If you’re on version1.3.7 and want to reach 4.2.6:
1
Apply bugfix releases
1.3.7 → 1.3.12).2
Move to latest minor version
1.3.12 → 1.20.5).3
Upgrade major versions incrementally
Advanced Strategies
For challenging upgrades with destructive breaking changes:Strategy 1: Pause/Upgrade/Unpause
Suitable when your business can tolerate a brief pause:1
Pause all queues
2
Wait for active jobs to complete
3
Perform the upgrade
Deploy the new BullMQ version to all instances.
4
Unpause queues
Strategy 2: Use New Queues
The most drastic but safest solution:1
Create new queues with different names
2
Run both versions in parallel
Maintain two versions of your service:
- Old service: Older BullMQ version with old queues
- New service: Latest BullMQ version with new queues
3
Direct new jobs to new queues
Update your producers to add jobs to the new queues:
4
Monitor old queues until drained
5
Retire old version
When the old queues have no more jobs to process, retire the old version.
Testing Upgrades
1
Test in staging first
Always test upgrades in a non-production environment before deploying to production.
2
Create a test suite
3
Monitor key metrics
Watch these metrics during upgrade:
- Job completion rate
- Error rate
- Queue length
- Stalled jobs
- Memory usage
Rollback Plan
Always have a rollback plan:1
Take a Redis snapshot
2
Document the current version
3
Prepare rollback commands
4
Test rollback procedure
Test the rollback in staging before production upgrade.
Upgrade Checklist
Pre-Upgrade
Pre-Upgrade
- Read the changelog
- Identify breaking changes
- Test upgrade in staging environment
- Take Redis snapshot
- Document current version
- Prepare rollback plan
- Schedule maintenance window if needed
During Upgrade
During Upgrade
- Update BullMQ package
- Update code for API changes
- Run tests
- Deploy to staging
- Monitor staging metrics
- Deploy to production
- Monitor production metrics closely
Post-Upgrade
Post-Upgrade
- Verify job processing is normal
- Check error rates
- Monitor queue lengths
- Review logs for warnings
- Document any issues
- Update documentation
Related Resources
Bull to BullMQ
Migrating from Bull to BullMQ
Migration Overview
General migration guidance
Going to Production
Production deployment best practices
Troubleshooting
Common issues and solutions
External Resources
BullMQ Changelog
Official changelog with all version changes
