SQS Flashcards
What is SQS?
SQS is a highly-distributed message queueing system on AWS.
What are the two types of queues on AWS?
Standard Queue, FIFO Queue
What are the advantages/disadvantages of Standard Queues?
Pros:
- Unlimited transactions per second
Cons:
- Order isn’t guaranteed and so can cause duplicate messages to occur
What are the advantages/disadvantages of FIFO Queues?
Pros:
- Order of messages is maintained
Cons:
- Can only have 300 transactions per second
What is polling?
Polling is the method that a consumer/reader uses to be notified/retrieve messages from the queue
What are the types of polling?
Short Polling (default), Long polling
Why use long polling?
Long polling will save costs as it will only return a message when a message has landed on the queue or the timeout completes
What is Visibility Timeout?
Visibility timeout is the timeout interval in which a message becomes invisible when picked out of a queue and then becomes visible again after it ends
What is the default Visibility Timeout?
The default visibility timeout is 30 seconds
If your visibility timeout is set incorrectly, can it cause a message to be read more than once?
Yes, if the job/process takes longer than the visibility timeout the message will appear in the queue again and may be picked up by another reader and so the message could be consumed twice
What does SQS guarantee regarding a message?
SQS guarantees that each message will be successfully delivered at least once
What is the max visibility timeout you can set?
12 hours
What is the default retention period for a message?
4 days
How long can a message be kept in a queue?
1minute - 14 days
What is the size of a message?
256KB