Amazon Simple Queue Service: Difference between revisions

Content deleted Content added
No edit summary
 
(44 intermediate revisions by 37 users not shown)
Line 1:
{{Short description|Cloud-based message queuing service}}
{{Refimprove|date=August 2015}}
{{mergeto|Amazon Web Services|date=November 2016}}
{{Infobox software
| name = Amazon Simple Queue Service
| titlelogo = AmazonAWS Simple QueueIcons Messaging Amazon ServiceSQS.svg
| logo = [[File:AWS Simple Icons Messaging Amazon SQS.svg|150px|Amazon Simple Queue Service logo]]
| logo caption = Amazon Simple Queue Service
| caption =
| collapsible =
| developer = [[Amazon.com]]
| license = [[Proprietary software]]
| released =
| website = {{URL|https://aws.amazon.com/sqs/}}
| discontinued =
}}
| latest release version =
| latest release date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| latest preview version =
| latest preview date = <!-- {{Start date and age|YYYY|MM|DD|df=yes/no}} -->
| frequently updated = yes
| programming language =
| op{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}{{unblock|Jon-Gabriel The KOF Fan 2017}}
w for secure handling of data. Amazon uses its [[Amazon Web Services]] (AWS) identification to do this, requiring users to have an AWS enabled account with Amazon.com; this can be created at http://aws.amazon.com. AWS assigns a pair of related identifiers, your AWS access keys, to an AWS enabled account to perform identification. The first identifier is a public 20-character Access Key. This key is included in an AWS service request to identify the user. If the user is not using [[SOAP (protocol)]] with [[WS-Security]], a digital signature is calculated using the Secret Access Key. The Secret Access Key is a 40-character private identifier. AWS uses the Access Key ID provided in a service request to look up an account's Secret Access Key. Amazon.com then calculates a digital signature with the key. If they match then the user is considered authentic, if not then the authentication fails and the request is not processed.
 
'''Amazon Simple Queue Service''' ('''Amazon SQS''') is a distributed [[message queuing service]] introduced by [[Amazon.com]] as a beta in late 2004, and generally available in mid 2006.<ref>{{Cite web|date=2006-07-13|title=Amazon Simple Queue Service Released|url=https://aws.amazon.com/blogs/aws/amazon_simple_q/|access-date=2021-10-29|website=Amazon Web Services|language=en-US}}</ref><ref>{{cite web|url=http://jeff-barr.com/2014/08/19/my-first-12-years-at-amazon-dot-com/ |title=My First 12 Years at Amazon.com|first=Jeff|last=Barr|date=2014-08-19|website=jeff-barr.com|access-date=2021-01-11}}</ref>
==Message delivery==
Amazon SQS guarantees '''at-least-once delivery'''. Messages are stored on multiple servers for redundancy and to ensure availability. If a message is delivered while a server is not available, it may not be removed from that server's queue and may be resent. {{As of|2007}}, Amazon SQS does not guarantee that the recipient will receive the messages in the order they were sent by the sender. If message ordering is important, it is required that the application place sequencing information within the messages to allow for reordering after delivery.
 
==API==
Messages can be of any type, and the data contained within is not restricted. Message bodies were initially limited to 8KB in size but was later raised to 64KB on 2010-07-01<ref>[https://forums.aws.amazon.com/ann.jspa?annID=710] {{webarchive |url=https://web.archive.org/web/20110829121354/https://forums.aws.amazon.com/ann.jspa?annID=710 |date=August 29, 2011 }}</ref> and then 256KB on 2013-06-18.<ref>{{cite web|url=http://aws.amazon.com/about-aws/whats-new/2013/06/18/amazon-sqs-announces-256KB-large-payloads/ |title=Amazon SQS and SNS Announce 256KB Large Payloads |publisher=Aws.amazon.com |date=2013-06-18 |accessdate=2015-08-13}}</ref> For larger messages, the user has a few options to get around this limitation. A large message can be split into multiple segments that are sent separately, or the message data can be stored using [[Amazon Simple Storage Service]] (Amazon S3) or [[Amazon DynamoDB]] with just a [[Pointer (computer programming)|pointer]] to the data transmitted in the SQS message. Amazon has made an Extended Client Library available for this purpose [https://github.com/awslabs/amazon-sqs-java-extended-client-lib].
Amazon provides SDKs in several programming languages, including:<ref name="awssdk">{{cite web |url=https://docs.aws.amazon.com/sdkref/latest/guide/overview.html |title=AWS SDKs and Tools |author=AWS |date=2024 |access-date=2024-05-29 }}</ref>
 
*[[C++]]
The service supports both unlimited queues and message traffic.
*[[Go (programming language)|Go]]
*[[Java (programming language)|Java]]
*[[JavaScript]]
*[[Kotlin (programming language)|Kotlin]]
*[[.NET Framework|.NET]]
*[[PHP]]
*[[Python (programming language)|Python]]
*[[Ruby (programming language)|Ruby]]
*[[Rust (programming language)|Rust]]
*[[Swift (programming language)|Swift]]
 
A [[Java Message Service]] (JMS) 1.1 client for Amazon SQS was released in December 2014.{{fact|date=May 2024}}
==Message deletion==
SQS does not automatically delete messages once they are sent. When a message is delivered, a receipt handle is generated for that delivery and sent to the recipient. These receipts are not sent with the message but in addition to it. SQS requires the recipient to provide the receipt in order to delete a message. This feature is new as of 2008 where only the message ID was required for message deletion. Because the system is distributed, a message may be sent more than once. In this case, the most recent receipt handle is needed to delete the message.
 
== Operation ==
Once a message is delivered, it has a '''visibility timeout''' to prevent other components from consuming it. The "clock" for the visibility timeout starts once a message is sent, the default time being 30 seconds. If the queue is not told to delete the message during this time, the message becomes visible again and will be resent.
[[Amazon Simple Queue Service|Amazon SQS]] FIFO and Azure Service Bus sessions are queue-based messaging systems that provide ordering guarantees within a message group or session attempt but do not necessarily guarantee ordered delivery in cases of retries or failures. In SQS FIFO, messages in the same message group are processed in order, with subsequent messages held until the preceding message is successfully processed or moved to the dead-letter queue (DLQ). Once a message is placed in the DLQ, it is no longer retried, creating a gap in the sequence. However, the remaining messages continue to be delivered in order.<ref>{{Cite web |title=FIFO queue delivery logic in Amazon SQS - Amazon Simple Queue Service |url=https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/FIFO-queues-understanding-logic.html |access-date=2025-03-22 |website=docs.aws.amazon.com}}</ref><ref>{{Cite web |title=Using dead-letter queues in Amazon SQS - Amazon Simple Queue Service |url=https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html |access-date=2025-03-22 |website=docs.aws.amazon.com}}</ref><ref>{{Cite web |title=Amazon SQS FIFO queues - Amazon Simple Queue Service |url=https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-fifo-queues.html |access-date=2025-03-22 |website=docs.aws.amazon.com}}</ref>
 
==Message delivery==
Each queue also consists of a '''retention''' parameter defaulting to 4 days. Any message residing in the queue for longer will be purged automatically. The retention can be modified from 1 minute up to 14 days by the user. If the retention is changed while messages are already in the queue, any message that has been in the queue for longer than the new retention will be purged.
Messages can be of any type, and the data contained within is not restricted. Message bodies were initially limited to 8KB in size but was later raised to 64KB on 2010-07-01<ref>{{Cite web|url=https://aws.amazon.com/about-aws/whats-new/2010/07/01/amazon-sqs-introduces-free-tier-and-adds-support-for-larger-messages-and-longer-retention/|title=Amazon SQS introduces Free Tier and adds Support for Larger Messages and Longer Retention|date=2010-07-01|website=aws.amazon.com|access-date=2021-01-11}}</ref> and then 256KB on 2013-06-18.<ref>{{cite web|url=https://aws.amazon.com/about-aws/whats-new/2013/06/18/amazon-sqs-announces-256KB-large-payloads/ |title=Amazon SQS and SNS Announce 256KB Large Payloads |website=aws.amazon.com |date=2013-06-18 |access-date=2021-01-11}}</ref> For larger messages, the user has a few options to get around this limitation. A large message can be split into multiple segments that are sent separately, or the message data can be stored using [[Amazon Simple Storage Service]] (Amazon S3) or [[Amazon DynamoDB]] with just a [[Pointer (computer programming)|pointer]] to the data transmitted in the SQS message. Amazon has made an Extended Client Library available for this purpose.<ref>{{GitHub|awslabs/amazon-sqs-java-extended-client-lib|An extension to the Amazon SQS client that enables sending and receiving messages up to 2GB via Amazon S3.}}</ref>
 
The service supports both unlimited queues and message traffic.
 
==Notable usage==
Examples of companies that use SQS extensively include:
[[Dropbox (service)|Dropbox]], [[Netflix]]<ref>http://techblog.netflix.com/2011/04/more-like-this-building-network-of.html</ref> and [[Nextdoor]]<ref>https://engblog.nextdoor.com/nextdoor-taskworker-simple-efficient-amp-scalable-ac4f7886957b</ref> are examples of companies that use SQS extensively. SQS is also widely used within Amazon.com.
 
*[[Dropbox (service)|Dropbox]]<ref>{{Cite AV media |url=https://www.youtube.com/watch?v=mP46FviScYQ |title=AWS re:Invent 2014 {{!}} (PFC308) How Dropbox Scales Massive Workloads Using Amazon SQS |date=2014-11-14 |last=Amazon Web Services |access-date=2024-12-07 |via=YouTube}}</ref>
*[[Netflix]]<ref>{{Cite web
| url=http://techblog.netflix.com/2011/04/more-like-this-building-network-of.html
| title="More Like This…" Building a network of similarity
| date=2011-04-18
| first=Hans
| last=Granqvist
| work=Netflix Tech Blog
| archive-url=https://web.archive.org/web/20161128083030/http://techblog.netflix.com/2011/04/more-like-this-building-network-of.html
| archive-date=2016-11-28
}}</ref>
*[[Nextdoor]]<ref>{{Cite web
| url=https://engblog.nextdoor.com/nextdoor-taskworker-simple-efficient-amp-scalable-ac4f7886957b
| title=Nextdoor Taskworker: Simple, Efficient & Scalable
| first=Wenbin
| last=Fang
| date=2014-08-13
| website=Nextdoor Engineering}}</ref>
*[[Amazon.com]]<ref>{{Cite web |title=Amazon SQS FAQs {{!}} Message Queuing Service {{!}} AWS |url=https://aws.amazon.com/sqs/faqs/?utm_source=chatgpt.com |access-date=2024-12-07 |website=Amazon Web Services, Inc. |language=en-US}}</ref>
 
==See also==
* [[Java Message Service]]
* [[IronMQ]]
* [[Message queue]]
* [[Message Queuing as a Service]]
* [[Oracle Cloud#Platform as a Service (PaaS)|Oracle Messaging Cloud Service]]
* [[StormMQ]]
 
==References==
{{Reflist}}
{{Refbegin}}
* {{cite web
| title = Amazon Simple Queue Service
| url = http://docs.amazonwebservices.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/
| date = 2011-07-08
}}
{{Refend}}
 
==External links==
*[http://www.amazon.com/Simple-Queue-Service-home-page/b?node=13584001 Amazon Simple Queue Service homepage]
*[https://github.com/adamw/elasticmq ElasticMQ - replicated message queue implementing the Amazon SQS interface]
 
{{Cloud computing}}
{{Amazon}}
 
[[Category:Amazon Web Services|SQS]]
[[Category:Message-oriented middleware]]
[[Category:Inter-process communication]]