Amazon SQS Retry with Backoff Strategy using DynamoDB
<p>Before we go into details on retry strategy, let’s first understand two important features Amazon SQS supports and their hard limits.</p>
<p><strong>Visibility Timeout</strong>: In simple terms, once the message is consumed for processing by a consumer, it will be visible to other consumers only after the configured visibility timeout (if not deleted). The maximum value for this configuration is <em>12 hours.</em></p>
<h2><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html?source=post_page-----40f1a0c821a8--------------------------------" rel="noopener ugc nofollow" target="_blank">Amazon SQS visibility timeout</a></h2>
<h3><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html?source=post_page-----40f1a0c821a8--------------------------------" rel="noopener ugc nofollow" target="_blank">Learn about the visibility timeout, which Amazon SQS uses to prevent consumers from processing a message a second time.</a></h3>
<p><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-visibility-timeout.html?source=post_page-----40f1a0c821a8--------------------------------" rel="noopener ugc nofollow" target="_blank">docs.aws.amazon.com</a></p>
<p><strong>Delay Seconds</strong>: It is the same as visibility timeout, with the difference that it is applicable only when the message is sent for the first time on the queue for processing. The maximum value for this configuration can be up to <em>15 minutes.</em></p>
<h2><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html?source=post_page-----40f1a0c821a8--------------------------------" rel="noopener ugc nofollow" target="_blank">Amazon SQS delay queues</a></h2>
<h3><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html?source=post_page-----40f1a0c821a8--------------------------------" rel="noopener ugc nofollow" target="_blank">Learn about postponing the delivery of new messages for a specific number of seconds using Amazon SQS delay queues.</a></h3>
<p><a href="https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-delay-queues.html?source=post_page-----40f1a0c821a8--------------------------------" rel="noopener ugc nofollow" target="_blank">docs.aws.amazon.com</a></p>
<p>By default, every time an application fails to process the message, the same message will be visible for processing once the visibility timeout has passed. For example, if the visibility timeout is set to 15 minutes, the application will receive the same message for retrying in the 15th minute, the 30th minute, the 45th minute, and so on.</p>
<p><a href="https://blog.devgenius.io/amazon-sqs-retry-with-backoff-strategy-using-dynamodb-40f1a0c821a8"><strong>Read More</strong></a></p>