Skip to content
Pablo Cantero edited this page Apr 3, 2017 · 36 revisions

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.