Introduction to Amazon SQS

Source: Internet
Author: User

SQS is the simple queue service, which is a distributed Message Queue Service. It is very simple to use. The Message Queue Service can be used for buffer burst, so that the entire service can be processed asynchronously and components are not always available.

When using Amazon SQS, developers only need to use five APIs:

Createqueue, sendmessage, receivemessage, changemessagevisibility, and deletemessage.


Amazon SQS tries its best to maintain the order of messages, but due to the distributed nature of queues, it cannot guarantee the order of messages. It is precisely because these features are discarded that SQS's scalability can be maintained.


Each Amazon SQS queue has configurable visibility timeout (default visibility timeout ). The message remains invisible to other readers within the specified time after it is read from the queue. As long as the message processing time is shorter than the visibility timeout, each message is processed and deleted. If the component that processes the message fails or is unavailable, the message is visible to any component that reads the queue after the visibility timeout. This allows multiple components to read messages from the same queue at the same time. Each component is responsible for processing different messages. Therefore, this feature requires the application to be idempotent.


When Amazon SQS returns a message to you, the message is saved in the queue, whether or not you actually receive the message. You are responsible for deleting the message. The deletion request confirms that you have processed the message. If you do not delete a message, Amazon SQS delivers the message in another receiving request.


This is also possible because a server in the distributed Amazon SQS system is not available for deletion, and the deletemessage operation fails to delete all copies of the message. This message copy may be delivered again, so consider this when designing an application so that no errors or inconsistencies will occur when you receive the deleted message again.


If no request is issued for a queue for more than 30 consecutive days, SQS may delete the queue: sendmessage, receivemessage, deletemessage, getqueueattributes, and setqueueattributes. This should be taken into account when designing an application.

Original article: http://blog.csdn.net/hongchangfirst/article/details/25870323

Author: hongchangfirst

Hongchangfirst home: http://blog.csdn.net/hongchangfirst


Introduction to Amazon SQS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.