Search code examples
amazon-web-servicesamazon-sqs

Fault Tolerant Clustered Queues - SQS


I would like to create SQS queues in 2 different AWS regions. Is there a way to setup synchronization between both queues? When data is read off a queue in either region , message must not be available for consumption. If one the region goes down , then consumer must start reading from the next message in the available region? Does AWS support this out of the box or are there any patterns available to support this use case?


Solution

  • No, this is not a feature of Amazon SQS.

    It would be quite difficult to implement because you cannot request a specific message off a queue. So, if a message is retrieved in one region, there is no way to delete that message in a different region. You would need to operate a database to keep track of the messages, which sort of defeats the whole purpose of the queue.

    Amazon SQS is a multi-AZ service that can survive failure of an Availability Zone, but resides in a single region.