SQS - Simple Queue Service Flashcards
What is Amazon SQS?
Web service that gives access to a message queue that can store messages while waiting for a computer to process them.
Distributed queue system enabling web services to queue messages that one component generates to be consumed by another component
Is SQS Push or Pull based?
Pull
Processing components pull the messages out of the queue
What is the visibility timeout window?
Amount of time a message is marked as invisible in the queue after a reader picks it up.
If job is processed before visibility time out expires, message is deleted
If job not processed before visibility time out expires, message becomes visible again for processing.
Can result in same message being delivered twice
How big can SQS messages be?
Up to 256KB of text in any format (JSON, etc)
What’s the size limit of SQS messages?
Up to 256KB of text in any format (JSON, etc)
Describe Standard queues
nearly unlimited amount of transactions per second
guarantees messages delivered at least once
Occasionally a message can be delivered out of order
Provides best-effort ordering where messages are mostly delivered in order they were received
Describe FIFO queues
Limited to 300 transactions per second
messages are strictly sent in the order they were received
messages are delivered only once and remain available until consumer processes and deletes it.
Duplicates are not created
Support message groups allowing multiple ordered groups within a single queue
How long can messages stay in the queue?
1 minute to 14 days
Default is 4 days
What is the maximum visibility time out?
12 hours
What is the maximum visibility time out?
12 hours
What is SQS Long Polling?
A way to retrieve messages from SQS queues
Default is regular short polling which returns immediately but always polls even if queue is empty.
Doesn’t return a response until message arrives in the message queue or the long poll times out
Long polling saves money by doing less polling