Exploring AWS !!
Day 55
Amazon SQS Standard Queues
Standard is the default queue type.
Supports unlimited API calls per second per API action (SendMessage, ReceiveMessage or DeleteMessage).
Sometimes, more than one copy of messages get delivered.
Tries best to get the orders delivered in the sequence as it was sent.
SQS stores messages in more than one AZ before acknowledgement of SendMessage.
You can use Standard queues is many scenarios, until your application allows more than once message delivery and out of order delivery.
- Let users upload media while encoding or decoding
- Processing credit card validation requests
- Scheduling multiple entries to enter to the database
Message Ordering -
Standard queues try it’s best to deliver the order in sequence as they were sent. But, in case, the sequence is really important you better go for FIFO queues, or try adding the sequencing information to get the messages reordered.
At-least-once delivery -
Copies of messages stored on multiple AZs for high availability. Sometimes, one of the server might be unavailable or deleted, in that case the message isn’t deleted, in-fact you get that message copy again when the message is received.
Queue and Message Identifiers -
Queue name and URL:
While creating a queue, you need to define q unique name for the queue.
Each queue has a queue URL assigned, which contains queue name and other SQS components.
ABCQueue is the queue name, and 123456789012 is the account number.
https://lnkd.in/d4gV7tE9
Message ID:
In the SendMessage response, you receive a message ID from Amazon SQS.
Receipt Handle -
Every time a message is received, you get a receipt handle. This handle is associated with the action of receiving message and not message itself. This receipt handle is to be given when updating the visibility or deleting messages. Thus, receiving a message is always important before deleting it. Maximum length of receipt handle is 1024.
Quotas
Delay queue — default delay is 0 seconds, maximum is 15 mins.
Listed Queues — 1000 queues per ListQueue request
Long polling wait time — maximum is 20 secs.
Messages per queue(backlog) — can store unlimited
Messages per queue(in flight) — maximum of approx 1,20,000 in flight messages.
Queue name — unique, upto 80 characters.
Queue tag — recommended not adding more than 50 tags, tag key is required.