I am using boto library in Python to get Amazon SQS messages. In exceptional cases I don\'t delete messages from queue in order to give a couple of more changes to recover tempo
aws has in-built support for this, just follow the below steps:
How it works is, whenever a message is received by the worker, the receive count increments. Once it reaches "Maximum Receives" count, the message is pushed to the dead letter queue. Note, even if you access the message via aws console, the receive count increments.
Source Using Amazon SQS Dead Letter Queues