Skip to content
Pablo Cantero edited this page Jul 1, 2017 · 36 revisions

Shoryuken options can be set via CLI:

shoryuken -q queue1 -l ./shoryuken.log -p ./shoryuken.pid

or via configuration file:

# config/shoryuken.yml
logfile: ./shoryuken.log
pidfile: ./shoryuken.pid
queues: 
  - queue1

When using a configuration file, you must set via CLI shoryuken -C ./config/shoryuken.yml, otherwise Shoryuken won't use it.

Some options available in the configuration file, are not available in the CLI. For checking all options available in the CLI: shoryuken help start.

delay

Delay is the number of seconds to pause fetching from when an empty queue.

Given this configuration:

delay: 25
queues:
  - queue1
  - queue2

If Shoryuken tries to fetch messages from queue1 and it has no messages, Shoryuken will pause fetching from queue1 for 25 seconds.

Usually having a delay is more cost efficient, but if you want to consume messages as soon as they get in the queue, I would recommend setting delay: 0 (default value) to stop pausing empty queues.

Check the AWS SQS pricing page for more information.

queues

A single Shoryuken process can consume messages from multiple queues. You can define your queues and their respective priorities as follows:

queues:
  - [queue1, 2]
  - [queue2, 1]

The priority above causes Shoryuken to process queue1 two times more than queue2.