AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.
WaitTimeSecondsparameter. For more information, see Amazon SQS Long Poll in the Amazon SQS Developer Guide.
Short poll is the default behavior where a weighted random set of machines is sampled on a
ReceiveMessagecall. This means only the messages on the sampled machines are returned. If the number of messages in the queue is small (less than 1000), it is likely you will get fewer messages than you requested per
ReceiveMessagecall. If the number of messages in the queue is extremely small, you might not receive any messages in a particular
ReceiveMessageresponse; in which case you should repeat the request.
For each message returned, the response includes the following:
MD5 digest of the message body. For information about MD5, go to http://www.faqs.org/rfcs/rfc1321.html.
Message ID you received when you sent the message to the queue.
MD5 digest of the message attributes.
The receipt handle is the identifier you must provide when deleting the message. For more information, see Queue and Message Identifiers in the Amazon SQS Developer Guide.
You can provide the
VisibilityTimeoutparameter in your request, which will be applied to the messages that Amazon SQS returns in the response. If you do not include the parameter, the overall visibility timeout for the queue is used for the returned messages. For more information, see Visibility Timeout in the Amazon SQS Developer Guide.
Going forward, new attributes might be added. If you are writing code that calls this action, we recommend that you structure your code so that it can handle new attributes gracefully.
public virtual ReceiveMessageResponse ReceiveMessage( ReceiveMessageRequest request )
Container for the necessary parameters to execute the ReceiveMessage service method.
|Amazon.SQS.Model.OverLimitException||The action that you requested would violate a limit. For example, ReceiveMessage returns this error if the maximum number of messages inflight has already been reached. AddPermission returns this error if the maximum number of permissions for the queue has already been reached.|
Supported in: 4.5, 4.0, 3.5