Skip to content

Improve documentation on Sidekiq's queue name #28

Description

@frodsan

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:

Sidekiq Advanced Options

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions