docs.nestjs.com
docs.nestjs.com copied to clipboard
feat(queues): add bullmq documentation
PR Checklist
Please check if your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/nestjs/docs.nestjs.com/blob/master/CONTRIBUTING.md
PR Type
What kind of change does this PR introduce?
- [x] Docs
What is the current behavior?
Only Bull (not BullMQ) usage is documented. Issue Number: https://github.com/nestjs/docs.nestjs.com/issues/2353
What is the new behavior?
Both Bull and BullMQ are documented.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
Other information
WIP. I have a few ToDo's to complete before it's ready for merge. However, I would appreciate feedback on the changes before investing more time in it.
Specifically, I lost interest in the change halfway through because I realized that BullMQ drops some important features I need. While there are workarounds, I decided to keep using Bull myself.
The features are:
- Timeout. Before it was a JobOption, now you have to pay for BullMQ-Pro if you want a somewhat similar feature with observables or manually implement timeouts in your jobs logic.
- Named processors. It seems some people felt it was confusing (my team didn't find it confusing at all, but oh well...) and thus they decided to remove what I consider an essential tool for clean and modularized code. We would have to implement some meta-programming ourselves to implement this behavior.
- Global Events (BullQueueGlobalEvents) don't exist anymore. I wasn't using it nor am I interested to be honest, but I mention it in case anyone else finds this list useful.
On the other side, the only new feature is Parent/Child Dependencies, which I personally don't feel a need for. If you want to pay for the pro version there are more features, like:
Observables, Group Rate Limit, Group Support and Batches Support. With that in consideration, I would say that currently the only benefit of BullMQ is that it's easier to replace with BullMQ-Pro if you ever need it.
What do you think? Should BullMQ be covered the way it's proposed in this PR? Should it be after Bull? Should it just be mentioned and direct people to https://docs.bullmq.io/guide/nestjs if it's something they find interesting?
Eagerly awaiting this. Recently joined a new project where devs still used @nestjs/bull instead of @nestjs/bullmq because there were no mentions in the docs about this package 😄. Even though we could've definitely used the BullMQ features.
Bump
Any updates on this please?