Improve documentation on Sidekiq's queue name
By default, the Sidekiq job uses the cellular queue which mean you have to add it to your Sidekiq configuration, like:
$ sidekiq -q default -q cellular
or
# config/sidekiq.yml
:queues:
- default
- cellular
The problem with this config is that is accidentally implying importance. This means that the default queue has more priority than the cellular queue.
If you want to use the weight for both queues, you can do:
$ sidekiq -q default,1 -q cellular,1
or
# config/sidekiq.yml
:queues:
- [default, 1]
- [cellular, 1]
Another fix is to use the default queue instead of cellular, and provide a way to override the default queue name. This is not backward compatible, but it plays good with common production setups:
# config/sidekiq.yml
:queues:
- [high, 4]
- [default, 2]
- [low, 1]
Right now, I'm using this config:
# config/sidekiq.yml
:queues:
- [high, 4]
- [default, 2]
- [mailers, 2]
- [low, 1]
I'm not using the cellular queue but it's there just in case a developer uses deliver_async without specifying a queue. I would like to remove it, so Sidekiq doesn't have to poll an unused queue.
References: