Closed vipulvkp closed 2 years ago
Hey @vipulvkp
When using include Shoryuken::Worker
(as opposed to active Job), the perform
method expects two params (source code.
Based on your code, the Retry policy will add a visibility timeout to the message in order to attempt the message at a later date.
Can you try to changing your code to:
class DailyWorker
include Shoryuken::Worker
shoryuken_options queue: 'daily_queue.fifo', auto_delete: true
def perform(sqs_msg, name) # With two arguments
p "ALL GOOD"
end
en
@matt-taylor Thank you so much. Yes after suggesting your change of making def perform(sqs_msg, name)
the control went inside worker call and yes the print message was recorded.
Hi,
I have a AWS SQS FIFO queue configured with visiblity timeout set to 30 seconds. Below is my shoryuken.yml file
I have defined one worker which listens to the queue and also auto_delete is set to true. As we can see, the processing is nothing but simply printing a message.
Also, I have enabled long polling in
config/initializers/shoryuken.rb
as belowBefore I start my shoryuken process , I add one message to the SQS Queue using SQS AWS Console. After starting shoryuken worker, the SQS message goes from
Messages Available
toMessages in Flight
and it is stuck in flight for ever. Please Note, AWS SQS message has a unique message group id and a unique message deduplication id. And there is only one message in the queueI read the documentation, In Flight status is when the consumer has received the message and has not deleted it yet. I wonder what could go wrong with my shoryuken worker as its doing a simple print statement and also auto_delete is set to true.