Skip to content

Shoryuken options

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

Shoryuken options can be set via CLI: shoryuken -q QUEUE-NAME or via a configuration file: shoryuken.yml. When using a configuration file, you must set via CLI shoryuken -C ./shoryuken.yml.

Some options available via a configuration file, are not available in the CLI, for checking all options available in the CLI, try shoryuken help start.

delay

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

Given this configuration:

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

If Shoryuken tries to fetch messages from queue1 and it has no messages, Shoryuken will pause the fetcher for queue1 for 25 seconds, queue2 will not be affected.

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 to set delay: 0 (default value) to stop pausing empty queues.

Please have a look at 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:
  - [high_priority, 2]
  - [low_priority, 1]

The priority above causes Shoryuken to process high_priority two times more than low_priority.

Have a look at Worker Options/queue to associate a worker with a queue.

Clone this wiki locally