Retrieves one or more messages from the specified queue, including the message body and message ID of each message. Messages returned by this action stay in the queue until you delete them. However, once a message is returned to a ReceiveMessage request, it is not returned on subsequent ReceiveMessage requests for the duration of the VisibilityTimeout. If you do not specify a VisibilityTimeout in the request, the overall visibility timeout for the queue is used for the returned messages.
If a message is available in the queue, the call will return immediately. Otherwise, it will wait up to WaitTimeSeconds for a message to arrive. If you do not specify WaitTimeSeconds in the request, the queue attribute by the same name is used to determine how long to wait.
You could ask for additional information about each message through the attributes. Attributes that can be requested are [SenderId, ApproximateFirstReceiveTimestamp, ApproximateReceiveCount, SentTimestamp].
C# |
public class ReceiveMessageRequest : SQSRequest
All Members | Constructors | Methods | Properties | ||
Icon | Member | Description |
---|---|---|
ReceiveMessageRequest()()()() | Initializes a new instance of the ReceiveMessageRequest class | |
AttributeName |
Gets and sets the AttributeName property.
The attribute you want to get. Valid values: All | SenderId | SentTimestamp | ApproximateReceiveCount |
ApproximateFirstReceiveTimestamp
| |
Equals(Object) | (Inherited from Object.) | |
GetHashCode()()()() | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType()()()() | Gets the type of the current instance. (Inherited from Object.) | |
IsSetAttributeName()()()() |
Checks if AttributeName property is set
| |
IsSetMaxNumberOfMessages()()()() |
Checks if MaxNumberOfMessages property is set
| |
IsSetMessageAttributeName()()()() |
Checks if MessageAttributeName property is set
| |
IsSetQueueUrl()()()() |
Checks if QueueUrl property is set
| |
IsSetVisibilityTimeout()()()() |
Checks if VisibilityTimeout property is set
| |
IsSetWaitTimeSeconds()()()() |
Checks if WaitTimeSeconds property is set
| |
MaxNumberOfMessages |
Gets and sets the MaxNumberOfMessages property.
Maximum number of messages to return. SQS never returns more messages than this value but might return fewer.
Not necessarily all the messages in the queue are returned (for more information, see the preceding note about
machine sampling). Values can be from 1 to 10. Default is 1.
| |
MessageAttributeName |
Gets and sets the MessageAttributeName property.
The message attributes you want to get.
| |
QueueUrl |
Gets and sets the QueueUrl property.
The URL associated with the Amazon SQS queue.
| |
ToString()()()() | Returns a string that represents the current object. (Inherited from Object.) | |
VisibilityTimeout |
Gets and sets the VisibilityTimeout property.
The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved
by a ReceiveMessage request.
| |
WaitTimeSeconds |
Gets and sets the WaitTimeSeconds property.
The number of seconds to wait for messages in the queue.
| |
WithAttributeName(array<String>[]()[][]) | Obsolete.
Sets the AttributeName property
| |
WithMaxNumberOfMessages(Decimal) | Obsolete.
Sets the MaxNumberOfMessages property
| |
WithMessageAttributeName(array<String>[]()[][]) | Obsolete.
Sets the MessageAttributeName property
| |
WithQueueUrl(String) | Obsolete.
Sets the QueueUrl property
| |
WithVisibilityTimeout(Decimal) | Obsolete.
Sets the VisibilityTimeout property
| |
WithWaitTimeSeconds(Int32) | Obsolete.
Sets the WaitTimeSeconds property
|
Object | ||
SQSRequest | ||
ReceiveMessageRequest |