Best way to move messages off DLQ in Amazon SQS?

Matt Dell picture Matt Dell · Aug 20, 2014 · Viewed 47.7k times · Source

What is the best practice to move messages from a dead letter queue back to the original queue in Amazon SQS?

Would it be

  1. Get message from DLQ
  2. Write message to queue
  3. Delete message from DLQ

Or is there a simpler way?

Also, will AWS eventually have a tool in the console to move messages off the DLQ?

Answer

Rajkumar picture Rajkumar · Jan 9, 2015

Here is a quick hack. This is definitely not the best or recommended option.

  1. Set the main SQS queue as the DLQ for the actual DLQ with Maximum Receives as 1.
  2. View the content in DLQ (This will move the messages to the main queue as this is the DLQ for the actual DLQ)
  3. Remove the setting so that the main queue is no more the DLQ of the actual DLQ