Skip to content

Multiple ways of configuring queues in Shoryuken

Pablo Cantero edited this page Jun 6, 2020 · 1 revision

The most common way to configure queues in Shoryuken is by defining them in the shoryuken.yml, as documented here.

You can configure them by name, URL, or ARN.

The shoryuken.yml is not only a YAML file, before parsing it as a YAML, Shoryuken parses it as an ERB, which supports embedded Ruby.

queues:
  - <%= ENV['QUEUE_NAME'] %>

Another way to add a queue is programmatic with Shoryuken.add_queue.

Shoryuken.add_queue('queue-name', 1, 'default')

# queue-name = queue name
# 1 = priority 
# default = processing group name, if not using processing groups, use default. See https://github.com/phstc/shoryuken/wiki/Processing-Groups

For more information, check out the source code.