SQS – AWS Developer Certified Exam Notes

  • SQS the first service that was launched
  • Amazon SQS is a web service that gives you access to a message queue that can be used to store messages while waiting for a computer to process them
  • Amazon SQS is a distributed queue system that enables web service applications to quickly and reliably queue messages that one component in the application generates to be consumed by another component. A queue is a temporary repository for messages that are awaiting processing
  • Using Amazon SQS you can decouple the components of an application so they run independently, with Amazon SQS easing message management between components.
  • Message can contain up to 256 KB of text in any format. Any component can later retrieve the messages programmatically using the Amazon SQS API
  • The queue acts as a buffer between the component producing and saving data, and the component receiving the data for processing.
  • This means the queue resolves issues that arise if the producer is producing work faster than the consumer can process it, or if the producer or consumer are only intermittently connected to the network
  • Amazon SQS ensures delivery of each message at least ONCE, and supports multiple readers and writers interacting with the same queue.
  • A single queue can be used simultaneously by many distributed application components, with ne need for those components to coordinate with each other to share the queue
  • SQS does not guarantee first in, first out delivery of messages. For many distributed applications, each message can stand on its own, and as long as all messages are delivered, the order is not important
  • Visibility Timeout period: Only start when the application service pull the message (Complete only when it is deleted from the queue, and this could be done only during Visibility Timeout Period)
    • Default Visibility Time Out is 30 Seconds
    • Maximum is 12 hours
    • When you receive a message from a queue and begin processing it, you may find the visibility timeout for the queue is insufficient to fully process and delete that message. To give yourself more time to process the message, you can extend its visibility timeout by using the ChangeMessageVIsibility action
  • SQS Pricing:
    • First 1 million Amazon SQS Requests per month are free
    • 0.50$ per 1 million Amazon SQS Requests per month thereafter
    • A single request can have from 1 to 10 messages, up to a maximum payload of 256KB
    • Each 64 KB ‘chunk’ of payload is billed as 1 request. For example, a single API call with 256 KB payload will be billed as four requests
  • SQS messages can be delivered multiple times and in any order
  • SQS long polling is a way to retrieve messages from your SQS queues. While the traditional SQS short polling returns immediately, even if the queue being polled is empty, SQS long polling doesn’t return a response until a message arrives in the queue, or the long polling times out.
    Maximun Long Poll Time Out = 20 seconds
  • SQS – Fanning Out:
    • Create an SNS topic using SNS. Then create and subscribe multiple SQS queues to the SNS topic
  • FIFO (first-in-first-out) queues preserve the exact order in which messages are sent and received
  • Amazon SWF API actions are task-oriented. Amazon SQS API actions are message-oriented.
  • Amazon Simple Workflow Service (Amazon SWF) is a web service that makes it easy to coordinate work across distributed application components.
  • The cost of Amazon SQS is calculated per request, plus data transfer charges for data transferred out of Amazon SQS
  • If the component processing of the message fails or becomes unavailable, the message again becomes visible to any component reading the message queue once the visibility timeout ends. This allows multiple components to read messages from the same message queue, each one working to process different messages.
  • No. Long-polling ReceiveMessage calls are billed exactly the same as short-polling ReceiveMessage calls.
  • You can delete all messages in an Amazon SQS message queue using the PurgeQueue action.
  • A standard queue lets you have a nearly-unlimited number of transactions per second
  • FIFO queues are limited to 300 transactions per second (TPS) per API action
  • When Amazon SQS returns a message to you “ReceiveMessage”, the message stays in the message queue whether or not you actually receive the message. You’re responsible for deleting the message “DeleteMessage” and the deletion request acknowledges that you’re done processing the message.
  • When you issue a DeleteMessage request on a previously-deleted message, Amazon SQS returns a success response.
  • Server-side encryption (SSE) lets you transmit sensitive data in encrypted queues. SSE protects the contents of messages in Amazon SQS queues using keys managed in the AWS Key Management Service (AWS KMS). SSE encrypts messages as soon as Amazon SQS receives them
  • SSE encrypts the body of a message in an Amazon SQS queue.
  • You can configure the Amazon SQS message retention period to a value from 1 minute to 14 days. The default is 4 days. Once the message retention limit is reached, your messages are automatically deleted.
  • To send messages larger than 256 KB, use the Amazon SQS Extended Client Library for Java. This library lets you send an Amazon SQS message that contains a reference to a message payload in Amazon S3 that can be as large as 2 GB.
  • There is a 120,000 limit for the number of inflight messages for a standard queue and 20,000 for a FIFO queue
  • No. Each Amazon SQS message queue is independent within each region., can’t share a message
  • SQS will deliver each message at least once, but cannot guarantee the delivery order
  • DeleteMessage API should be called to prevent the message from becoming visible again
  • SQS Visibility timeout of 0 will make message immediately available for processing
  • When ReceiveMessageWaitTimeSeconds is set to a value greater than zero, long polling is enabled
  • To change the visibility timeout of an SQS message, you should use ChangeMessageVisibility Action
  • The minimum visibility timeout for an SQS message is 0 seconds. There is NO WAY to decrease that value
  • A FIFO SQS queue will end with the .fifo suffix
  • A message is considered to be in flight after it’s received from a queue by a consumer, but not yet deleted from the queue
  • AWS SQS is PCI DSS certified
  • You can configure an access policy that allows anonymous users to access a message queue
  • DEAD LETTER QUEUES, Which are queues that receive messages from other source queues (Unsuccessfully-processed messages in SQS)
  • Amazon SQS supports versions 1.0, 1.1 and 1.2 of TLS
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s