Section 10 - AWS SQS Flashcards
1
Q
What is Amazon SQS?
A
Amazon SQS:
- A message queue service
- decouple applciation components
- messages can be up to 256kb
- pull-based (Not push)
- rmessages can be kept in the queue from one minute to 14 days (The default retention period is four days)
2
Q
What types of Queue are Available?
A
Two types of Queue:
-
Standard queues are default, which privide bets-effort ordering.
- Unlimited Transactions
- Guarantee
- Guarantees that a message is delivered at least once
- best-effort ordering which ensures that messages are generally delivered in the same order as they are sent.
- occasional duplicates
-
FIFO (First-in-first-out) queues
- The order in which messages are sent and received is strictly preserved
- a massage is delivered once and remains available until a consumer processes and deletes it. Duplicates are not introduced.
- there is a limit of 300 Transactions per second (TPS limit)
3
Q
Amazon SQS Settings?
A
-
Visibility timeout
- Visibility timeout is the amount of time that the message is invisible in the SQS queue after a reader picks up that message.
- default timeout is 30 seconds for a message to be invisible.
- the visibility timeout can be changed (Maximum 12 hours)
-
Short Polling
- Returns a response immediately even if there message queue is being polled is empty.
- This can result in a lot of empty responses if nothing is in the queue.
- you will still pay for these response.
-
Long Polling
- Periodically polls the queue
- Doesn’t return a response until a message arrives in the message queue or the long poll times out.
- Can save money
- Long polling is generally preferable to short polling.
4
Q
Amazon SQS Delay Queues?
A
SQS Delay Queues - postpone delivery of new messages
- Postpone delivery of new messages to a queue for a number of seconds
- Messages sent to the Delay Queue remian invisible to consumers for a duration of the delay period
- Default delay is 0 seconds, maximum is 900 (15 minutes)
- For Standard Queues, changing the setting does’nt affect the delay of messages already in the queue, only new messages
- For FIFO Queues, this affects the delay of messages already in the queue
5
Q
Amazon SQS Large Messages?
A
Best Practice for Managing Large SQS messages using AWS S3
- For large SQS messages - 256KB up to 2GB in size
- Use S3 to store the messages
- Use Amazon SQS Extended Client Library for Java to manage them
- Cannot use the AWS CLI,AWS Management Cosole, SQS Console, SQS API
6
Q
A