AWS - Simple Queue Service (SQS)



  • SQS is a message queue service that can be used to store messages while waiting for consumer application to process them.
  • The queues resolve issues that arise of producer is producing messages at faster pace that at what consumer can consume, or if producer or consumer are only intermittently connected to network.
  • Standard queue (default) guarantees that the message will be delivered atleast once, but sometimes message can get duplicated and delivered multiple times.
  • Standard queue provides best-effort ordering.
  • FIFO queues provide first-in-first-out ordering and exactly once delivery.
  • FIFO queue is limited to 300 transactions per second.
  • SQS us pull based, NOT push based
  • Message size is limited to 256KB.
  • Messages can be kept in queue from 1 min to 14 days.
  •  Default retention period is 4 days.
  • SQS guarantees that your messages will be processed atleast once.
  • SQS Visibility Timeout: Once a message is picked up for processing it is marked as invisible in the queue. If the processing is not completed within SQS Visibility Timeout period, the the message will reappear in the queue after Visibility TImeout has expired. If the message completes processing within Visibility Timeout, then the message is deleted from the queue.
  • Visibility timeout is max at 12 hrs and default at 30 secs.
  • FIFO queues is good for banking transactions that need to happen only once.
  • Short Polling - Returns immediately even if there is no message in the queue.
  • Long Polling: Returns only if a message is in the queue or timeout is reached.


0 comments:

Post a Comment