SQS Flashcards
What is SQS?
Simple Queue Service
Gives access to message queue that can be used to store messages while waiting to process them
Is SQS pull or push based?
Pull based
Default of Visibility Timeout
30 sec
Max increase of Visibility Timeout
12 hrs
Largest size of text you can store in SQS queue
256 KB
How long is stuff kept in SQS queue
1-14 days
Default retention of SQS queue
4 days
Standard Queue
Default
Nearly unlimited transactions per sec
No order (best effort)
Couple be delievered twice
FIFO Queue
Guaranteed order
No duplicate
Limit 300 transactions per sec
Long Polling
Retrieve from SQS queue not return response until message is in the queue
Saves money
Periodically polls
Returns response once message arrives in queue
Short polling
Keeps polling from queue even if nothing is in the queue
What should you do if SQS is taking over 30 sec to process messages?
Increase the message visibility timeout
What is the default seconds for a delay queue
0 sec - 900 sec (15 min)
If you have large messages (256KB - 2GB) for SQS where should you store them?
S3 then will need
Amazon SQS Extended Client Library for Java
How to include metatdata : timestamps, geospatial data, signatures, and identifiers in SQS message
Use message attributes
What is a Dead Letter Queue
Allows you to set aside messages that couldn’t be processed right. This allows you to determine why it didn’t succeed
Attribute to set if want to change queue from short polling to long polling
ReceiveMessageWaitTimeSeconds
set to a value greater than 0
What are Dead Letter Queues (DLQ) used for?
Direct unprocessed events to an SQS queue or SNS topic to analyze the failure
How to get rid of duplicate data in SQS queue
Add MessageDeduplicationID parameter to SendMessage API request. And make sure messages are sent 5min apart