Migration Paths
Bull to BullMQ
Migrate from the legacy Bull package to BullMQ
Newer BullMQ Versions
Upgrade between BullMQ versions safely
Understanding Migration Types
Different types of upgrades require different strategies:- Bugfix Releases
- New Features
- Breaking Changes
Version Pattern:
3.14.4 → 3.14.7 (micro version change)- Risk Level: Low
- Strategy: Simple update, no code changes needed
- Downtime: None required
While it’s not critical that all instances run the same version, we recommend it for consistency.
General Migration Advice
Recommended Upgrade Path
1
Start with bugfix releases
Apply all bugfix releases first (e.g.,
1.3.7 → 1.3.12)2
Proceed to new features
Move to the latest minor version (e.g.,
1.3.12 → 1.10.5)3
Finally, major releases
Only then upgrade major versions (e.g.,
1.10.5 → 2.0.0)Example Migration Timeline
If you’re on version1.3.7 and want to reach 4.2.6:
Migration Strategies
For challenging upgrades, consider these strategies:Pause/Upgrade/Unpause
Pause/Upgrade/Unpause
Suitable when your business can tolerate a brief pause:
1
Pause all queues
2
Wait for active jobs to complete
3
Upgrade all instances
Deploy new version to all workers and queue instances
4
Unpause queues
Blue-Green Deployment
Blue-Green Deployment
Run old and new versions side-by-side:
- Deploy new version alongside old version
- Gradually shift traffic to new version
- Monitor for issues
- Once stable, retire old version
- You have sufficient infrastructure
- Changes are additive (not destructive)
- You can route jobs between versions
Use New Queues
Use New Queues
The safest but most drastic solution:Or use a different prefix:
1
Create new queues with different names
2
Run both versions in parallel
- Old version processes old queues
- New version processes new queues
- Direct new jobs to new queues
3
Wait for old queues to drain
Monitor old queues until all jobs are processed
4
Retire old version
Once old queues are empty, shut down old version
Testing Migrations
1
Test in staging environment
Always test migrations in a non-production environment first
2
Create test jobs
3
Verify job processing
Ensure jobs are processed correctly with the new version
4
Monitor for errors
Watch logs and error rates during and after migration
Monitoring During Migration
Key metrics to watch:Job Completion Rate
Ensure jobs continue to complete at normal rates
Error Rate
Watch for spikes in errors during migration
Queue Length
Monitor waiting and active job counts
Stalled Jobs
Check for unusual numbers of stalled jobs
Need Help?
If you encounter issues during migration:- Check the Troubleshooting guide
- Review the Changelog
- Ask in GitHub Discussions
- Report bugs in GitHub Issues
Related Resources
Bull to BullMQ
Detailed guide for migrating from Bull
Newer Versions
Strategies for upgrading BullMQ versions
Going to Production
Production deployment best practices
Troubleshooting
Common issues and solutions
