Reputation: 145
When I was going through this Amazon SQS Document I found that
The queue (which holds messages A through E) redundantly stores the messages across multiple Amazon SQS servers.
So, my question is when I poll Message A
from SQS, does this Message A
come from single server? Then what happened to the message which is store in the different server? How they remain invisible up to visible timeout or get deleted when consumers delete the message after processing?
Upvotes: 1
Views: 4297
Reputation: 35146
Whenever you interact with an AWS service you will only be touching a single server for the API interaction (although this would not be the same server the queue exists, it is simply the front-facing API).
For understanding what happens under the hood you can only speculate, however based on how other services work the service will attempt to get the items from queue whilst updating the visibility of the items. This would be sent in parallel to all nodes containing your queued items. These are then returned to you.
Taking a look at the documentation the following is stated
Standard queues support at-least-once message delivery. However, occasionally (because of the highly distributed architecture that allows nearly unlimited throughput), more than one copy of a message might be delivered out of order.
From this line it states at-least once
which indicates that there is always a chance that a message can be delivered more than once during the period described.
Upvotes: 3