Search code examples
amazon-web-servicesaws-sdkamazon-sqs

Change deduplication interval in SQS FIFO


Is there a way to increase contentBasedDeduplication interval in SQS FIFO Queues? In the developer guide they mention

If a message with a particular message deduplication ID is sent successfully, any messages sent with the same message deduplication ID are accepted successfully but aren't delivered during the 5-minute deduplication interval.

However in the API reference they mention:

When ContentBasedDeduplication is in effect, messages with identical content sent within the deduplication interval are treated as duplicates and only one copy of the message is delivered.

When I try to create a FIFO queue I do not see any option to change the deduplication interval. Is that fixed?


Solution

  • In FIFO queues, the Deduplication Interval is fixed for 5 mins. Currently there is NO way to increase the deduplication time window.

    This concern has been raised in one of the AWS Forums in 2017, but still it seems like this is not available as a feature.

    Additional Note:

    The purpose of having a deduplication Interval is to avoid processing the same message twice within the given 5 minutes. If you want to increase it, it would seem like an overhead on SQS because it needs to keep track of previous messages for a longer period.

    I suggest having a filtering layer between your program and SQS, to remove duplicates, according to your required logic. Same with if you want to decrease it.

    Hope this helps.