AWS SDK for C++  1.7.124
AWS SDK for C++
Public Member Functions | Protected Member Functions | List of all members
Aws::SQS::Model::ReceiveMessageRequest Class Reference

#include <ReceiveMessageRequest.h>

+ Inheritance diagram for Aws::SQS::Model::ReceiveMessageRequest:

Public Member Functions

 ReceiveMessageRequest ()
 
virtual const char * GetServiceRequestName () const override
 
Aws::String SerializePayload () const override
 
const Aws::StringGetQueueUrl () const
 
bool QueueUrlHasBeenSet () const
 
void SetQueueUrl (const Aws::String &value)
 
void SetQueueUrl (Aws::String &&value)
 
void SetQueueUrl (const char *value)
 
ReceiveMessageRequestWithQueueUrl (const Aws::String &value)
 
ReceiveMessageRequestWithQueueUrl (Aws::String &&value)
 
ReceiveMessageRequestWithQueueUrl (const char *value)
 
const Aws::Vector< QueueAttributeName > & GetAttributeNames () const
 
bool AttributeNamesHasBeenSet () const
 
void SetAttributeNames (const Aws::Vector< QueueAttributeName > &value)
 
void SetAttributeNames (Aws::Vector< QueueAttributeName > &&value)
 
ReceiveMessageRequestWithAttributeNames (const Aws::Vector< QueueAttributeName > &value)
 
ReceiveMessageRequestWithAttributeNames (Aws::Vector< QueueAttributeName > &&value)
 
ReceiveMessageRequestAddAttributeNames (const QueueAttributeName &value)
 
ReceiveMessageRequestAddAttributeNames (QueueAttributeName &&value)
 
const Aws::Vector< Aws::String > & GetMessageAttributeNames () const
 
bool MessageAttributeNamesHasBeenSet () const
 
void SetMessageAttributeNames (const Aws::Vector< Aws::String > &value)
 
void SetMessageAttributeNames (Aws::Vector< Aws::String > &&value)
 
ReceiveMessageRequestWithMessageAttributeNames (const Aws::Vector< Aws::String > &value)
 
ReceiveMessageRequestWithMessageAttributeNames (Aws::Vector< Aws::String > &&value)
 
ReceiveMessageRequestAddMessageAttributeNames (const Aws::String &value)
 
ReceiveMessageRequestAddMessageAttributeNames (Aws::String &&value)
 
ReceiveMessageRequestAddMessageAttributeNames (const char *value)
 
int GetMaxNumberOfMessages () const
 
bool MaxNumberOfMessagesHasBeenSet () const
 
void SetMaxNumberOfMessages (int value)
 
ReceiveMessageRequestWithMaxNumberOfMessages (int value)
 
int GetVisibilityTimeout () const
 
bool VisibilityTimeoutHasBeenSet () const
 
void SetVisibilityTimeout (int value)
 
ReceiveMessageRequestWithVisibilityTimeout (int value)
 
int GetWaitTimeSeconds () const
 
bool WaitTimeSecondsHasBeenSet () const
 
void SetWaitTimeSeconds (int value)
 
ReceiveMessageRequestWithWaitTimeSeconds (int value)
 
const Aws::StringGetReceiveRequestAttemptId () const
 
bool ReceiveRequestAttemptIdHasBeenSet () const
 
void SetReceiveRequestAttemptId (const Aws::String &value)
 
void SetReceiveRequestAttemptId (Aws::String &&value)
 
void SetReceiveRequestAttemptId (const char *value)
 
ReceiveMessageRequestWithReceiveRequestAttemptId (const Aws::String &value)
 
ReceiveMessageRequestWithReceiveRequestAttemptId (Aws::String &&value)
 
ReceiveMessageRequestWithReceiveRequestAttemptId (const char *value)
 
- Public Member Functions inherited from Aws::SQS::SQSRequest
virtual ~SQSRequest ()
 
void AddParametersToRequest (Aws::Http::HttpRequest &httpRequest) const
 
Aws::Http::HeaderValueCollection GetHeaders () const override
 
- Public Member Functions inherited from Aws::AmazonSerializableWebServiceRequest
 AmazonSerializableWebServiceRequest ()
 
virtual ~AmazonSerializableWebServiceRequest ()
 
std::shared_ptr< Aws::IOStreamGetBody () const override
 
- Public Member Functions inherited from Aws::AmazonWebServiceRequest
 AmazonWebServiceRequest ()
 
virtual ~AmazonWebServiceRequest ()=default
 
virtual void AddQueryStringParameters (Aws::Http::URI &uri) const
 
virtual void PutToPresignedUrl (Aws::Http::URI &uri) const
 
virtual bool IsStreaming () const
 
virtual bool SignBody () const
 
virtual bool IsChunked () const
 
const Aws::IOStreamFactoryGetResponseStreamFactory () const
 
void SetResponseStreamFactory (const Aws::IOStreamFactory &factory)
 
virtual void SetDataReceivedEventHandler (const Aws::Http::DataReceivedEventHandler &dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (const Aws::Http::DataSentEventHandler &dataSentEventHandler)
 
virtual void SetContinueRequestHandler (const Aws::Http::ContinueRequestHandler &continueRequestHandler)
 
virtual void SetDataReceivedEventHandler (Aws::Http::DataReceivedEventHandler &&dataReceivedEventHandler)
 
virtual void SetDataSentEventHandler (Aws::Http::DataSentEventHandler &&dataSentEventHandler)
 
virtual void SetContinueRequestHandler (Aws::Http::ContinueRequestHandler &&continueRequestHandler)
 
virtual void SetRequestRetryHandler (const RequestRetryHandler &handler)
 
virtual void SetRequestRetryHandler (RequestRetryHandler &&handler)
 
virtual const Aws::Http::DataReceivedEventHandlerGetDataReceivedEventHandler () const
 
virtual const Aws::Http::DataSentEventHandlerGetDataSentEventHandler () const
 
virtual const Aws::Http::ContinueRequestHandlerGetContinueRequestHandler () const
 
virtual const RequestRetryHandlerGetRequestRetryHandler () const
 
virtual bool ShouldComputeContentMd5 () const
 

Protected Member Functions

void DumpBodyToUrl (Aws::Http::URI &uri) const override
 
- Protected Member Functions inherited from Aws::SQS::SQSRequest
virtual Aws::Http::HeaderValueCollection GetRequestSpecificHeaders () const
 

Detailed Description

See Also:

AWS API Reference

Definition at line 36 of file ReceiveMessageRequest.h.

Constructor & Destructor Documentation

◆ ReceiveMessageRequest()

Aws::SQS::Model::ReceiveMessageRequest::ReceiveMessageRequest ( )

Member Function Documentation

◆ AddAttributeNames() [1/2]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::AddAttributeNames ( const QueueAttributeName value)
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 276 of file ReceiveMessageRequest.h.

◆ AddAttributeNames() [2/2]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::AddAttributeNames ( QueueAttributeName &&  value)
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 301 of file ReceiveMessageRequest.h.

◆ AddMessageAttributeNames() [1/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::AddMessageAttributeNames ( const Aws::String value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 428 of file ReceiveMessageRequest.h.

◆ AddMessageAttributeNames() [2/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::AddMessageAttributeNames ( Aws::String &&  value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 446 of file ReceiveMessageRequest.h.

◆ AddMessageAttributeNames() [3/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::AddMessageAttributeNames ( const char *  value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 464 of file ReceiveMessageRequest.h.

◆ AttributeNamesHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::AttributeNamesHasBeenSet ( ) const
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 151 of file ReceiveMessageRequest.h.

◆ DumpBodyToUrl()

void Aws::SQS::Model::ReceiveMessageRequest::DumpBodyToUrl ( Aws::Http::URI uri) const
overrideprotectedvirtual

Default does nothing. Override this to convert what would otherwise be the payload of the request to a query string format.

Reimplemented from Aws::AmazonWebServiceRequest.

◆ GetAttributeNames()

const Aws::Vector<QueueAttributeName>& Aws::SQS::Model::ReceiveMessageRequest::GetAttributeNames ( ) const
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 126 of file ReceiveMessageRequest.h.

◆ GetMaxNumberOfMessages()

int Aws::SQS::Model::ReceiveMessageRequest::GetMaxNumberOfMessages ( ) const
inline

The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.

Definition at line 472 of file ReceiveMessageRequest.h.

◆ GetMessageAttributeNames()

const Aws::Vector<Aws::String>& Aws::SQS::Model::ReceiveMessageRequest::GetMessageAttributeNames ( ) const
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 320 of file ReceiveMessageRequest.h.

◆ GetQueueUrl()

const Aws::String& Aws::SQS::Model::ReceiveMessageRequest::GetQueueUrl ( ) const
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 58 of file ReceiveMessageRequest.h.

◆ GetReceiveRequestAttemptId()

const Aws::String& Aws::SQS::Model::ReceiveMessageRequest::GetReceiveRequestAttemptId ( ) const
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 607 of file ReceiveMessageRequest.h.

◆ GetServiceRequestName()

virtual const char* Aws::SQS::Model::ReceiveMessageRequest::GetServiceRequestName ( ) const
inlineoverridevirtual

Implements Aws::AmazonWebServiceRequest.

Definition at line 45 of file ReceiveMessageRequest.h.

◆ GetVisibilityTimeout()

int Aws::SQS::Model::ReceiveMessageRequest::GetVisibilityTimeout ( ) const
inline

The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

Definition at line 501 of file ReceiveMessageRequest.h.

◆ GetWaitTimeSeconds()

int Aws::SQS::Model::ReceiveMessageRequest::GetWaitTimeSeconds ( ) const
inline

The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.

Definition at line 531 of file ReceiveMessageRequest.h.

◆ MaxNumberOfMessagesHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::MaxNumberOfMessagesHasBeenSet ( ) const
inline

The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.

Definition at line 479 of file ReceiveMessageRequest.h.

◆ MessageAttributeNamesHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::MessageAttributeNamesHasBeenSet ( ) const
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 338 of file ReceiveMessageRequest.h.

◆ QueueUrlHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::QueueUrlHasBeenSet ( ) const
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 64 of file ReceiveMessageRequest.h.

◆ ReceiveRequestAttemptIdHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::ReceiveRequestAttemptIdHasBeenSet ( ) const
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 658 of file ReceiveMessageRequest.h.

◆ SerializePayload()

Aws::String Aws::SQS::Model::ReceiveMessageRequest::SerializePayload ( ) const
overridevirtual

Convert payload into String.

Implements Aws::AmazonSerializableWebServiceRequest.

◆ SetAttributeNames() [1/2]

void Aws::SQS::Model::ReceiveMessageRequest::SetAttributeNames ( const Aws::Vector< QueueAttributeName > &  value)
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 176 of file ReceiveMessageRequest.h.

◆ SetAttributeNames() [2/2]

void Aws::SQS::Model::ReceiveMessageRequest::SetAttributeNames ( Aws::Vector< QueueAttributeName > &&  value)
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 201 of file ReceiveMessageRequest.h.

◆ SetMaxNumberOfMessages()

void Aws::SQS::Model::ReceiveMessageRequest::SetMaxNumberOfMessages ( int  value)
inline

The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.

Definition at line 486 of file ReceiveMessageRequest.h.

◆ SetMessageAttributeNames() [1/2]

void Aws::SQS::Model::ReceiveMessageRequest::SetMessageAttributeNames ( const Aws::Vector< Aws::String > &  value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 356 of file ReceiveMessageRequest.h.

◆ SetMessageAttributeNames() [2/2]

void Aws::SQS::Model::ReceiveMessageRequest::SetMessageAttributeNames ( Aws::Vector< Aws::String > &&  value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 374 of file ReceiveMessageRequest.h.

◆ SetQueueUrl() [1/3]

void Aws::SQS::Model::ReceiveMessageRequest::SetQueueUrl ( const Aws::String value)
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 70 of file ReceiveMessageRequest.h.

◆ SetQueueUrl() [2/3]

void Aws::SQS::Model::ReceiveMessageRequest::SetQueueUrl ( Aws::String &&  value)
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 76 of file ReceiveMessageRequest.h.

◆ SetQueueUrl() [3/3]

void Aws::SQS::Model::ReceiveMessageRequest::SetQueueUrl ( const char *  value)
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 82 of file ReceiveMessageRequest.h.

◆ SetReceiveRequestAttemptId() [1/3]

void Aws::SQS::Model::ReceiveMessageRequest::SetReceiveRequestAttemptId ( const Aws::String value)
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 709 of file ReceiveMessageRequest.h.

◆ SetReceiveRequestAttemptId() [2/3]

void Aws::SQS::Model::ReceiveMessageRequest::SetReceiveRequestAttemptId ( Aws::String &&  value)
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 760 of file ReceiveMessageRequest.h.

◆ SetReceiveRequestAttemptId() [3/3]

void Aws::SQS::Model::ReceiveMessageRequest::SetReceiveRequestAttemptId ( const char *  value)
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 811 of file ReceiveMessageRequest.h.

◆ SetVisibilityTimeout()

void Aws::SQS::Model::ReceiveMessageRequest::SetVisibilityTimeout ( int  value)
inline

The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

Definition at line 515 of file ReceiveMessageRequest.h.

◆ SetWaitTimeSeconds()

void Aws::SQS::Model::ReceiveMessageRequest::SetWaitTimeSeconds ( int  value)
inline

The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.

Definition at line 547 of file ReceiveMessageRequest.h.

◆ VisibilityTimeoutHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::VisibilityTimeoutHasBeenSet ( ) const
inline

The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

Definition at line 508 of file ReceiveMessageRequest.h.

◆ WaitTimeSecondsHasBeenSet()

bool Aws::SQS::Model::ReceiveMessageRequest::WaitTimeSecondsHasBeenSet ( ) const
inline

The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.

Definition at line 539 of file ReceiveMessageRequest.h.

◆ WithAttributeNames() [1/2]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithAttributeNames ( const Aws::Vector< QueueAttributeName > &  value)
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 226 of file ReceiveMessageRequest.h.

◆ WithAttributeNames() [2/2]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithAttributeNames ( Aws::Vector< QueueAttributeName > &&  value)
inline

A list of s that need to be returned along with each message. These attributes include:

  • All - Returns all values.

  • ApproximateFirstReceiveTimestamp - Returns the time the message was first received from the queue (epoch time in milliseconds).

  • ApproximateReceiveCount - Returns the number of times a message has been received from the queue but not deleted.

  • SenderId

    • For an IAM user, returns the IAM user ID, for example ABCDEFGHI1JKLMNOPQ23R.

    • For an IAM role, returns the IAM role ID, for example ABCDE1F2GH3I4JK5LMNOP:i-a123b456.

  • SentTimestamp - Returns the time the message was sent to the queue (epoch time in milliseconds).

  • MessageDeduplicationId - Returns the value provided by the producer that calls the SendMessage action.

  • MessageGroupId - Returns the value provided by the producer that calls the SendMessage action. Messages with the same MessageGroupId are returned in sequence.

  • SequenceNumber - Returns the value provided by Amazon SQS.

Definition at line 251 of file ReceiveMessageRequest.h.

◆ WithMaxNumberOfMessages()

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithMaxNumberOfMessages ( int  value)
inline

The maximum number of messages to return. Amazon SQS never returns more messages than this value (however, fewer messages might be returned). Valid values: 1 to 10. Default: 1.

Definition at line 493 of file ReceiveMessageRequest.h.

◆ WithMessageAttributeNames() [1/2]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithMessageAttributeNames ( const Aws::Vector< Aws::String > &  value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 392 of file ReceiveMessageRequest.h.

◆ WithMessageAttributeNames() [2/2]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithMessageAttributeNames ( Aws::Vector< Aws::String > &&  value)
inline

The name of the message attribute, where N is the index.

  • The name can contain alphanumeric characters and the underscore (_), hyphen (-), and period (.).

  • The name is case-sensitive and must be unique among all attribute names for the message.

  • The name must not start with AWS-reserved prefixes such as AWS. or Amazon. (or any casing variants).

  • The name must not start or end with a period (.), and it should not have periods in succession (..).

  • The name can be up to 256 characters long.

When using ReceiveMessage, you can send a list of attribute names to receive, or you can return all of the attributes by specifying All or .* in your request. You can also use all message attributes starting with a prefix, for example bar.*.

Definition at line 410 of file ReceiveMessageRequest.h.

◆ WithQueueUrl() [1/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithQueueUrl ( const Aws::String value)
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 88 of file ReceiveMessageRequest.h.

◆ WithQueueUrl() [2/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithQueueUrl ( Aws::String &&  value)
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 94 of file ReceiveMessageRequest.h.

◆ WithQueueUrl() [3/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithQueueUrl ( const char *  value)
inline

The URL of the Amazon SQS queue from which messages are received.

Queue URLs and names are case-sensitive.

Definition at line 100 of file ReceiveMessageRequest.h.

◆ WithReceiveRequestAttemptId() [1/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithReceiveRequestAttemptId ( const Aws::String value)
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 862 of file ReceiveMessageRequest.h.

◆ WithReceiveRequestAttemptId() [2/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithReceiveRequestAttemptId ( Aws::String &&  value)
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 913 of file ReceiveMessageRequest.h.

◆ WithReceiveRequestAttemptId() [3/3]

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithReceiveRequestAttemptId ( const char *  value)
inline

This parameter applies only to FIFO (first-in-first-out) queues.

The token used for deduplication of ReceiveMessage calls. If a networking issue occurs after a ReceiveMessage action, and instead of a response you receive a generic error, you can retry the same action with an identical ReceiveRequestAttemptId to retrieve the same set of messages, even if their visibility timeout has not yet expired.

  • You can use ReceiveRequestAttemptId only for 5 minutes after a ReceiveMessage action.

  • When you set FifoQueue, a caller of the ReceiveMessage action can provide a ReceiveRequestAttemptId explicitly.

  • If a caller of the ReceiveMessage action doesn't provide a ReceiveRequestAttemptId, Amazon SQS generates a ReceiveRequestAttemptId.

  • You can retry the ReceiveMessage action with the same ReceiveRequestAttemptId if none of the messages have been modified (deleted or had their visibility changes).

  • During a visibility timeout, subsequent calls with the same ReceiveRequestAttemptId return the same messages and receipt handles. If a retry occurs within the deduplication interval, it resets the visibility timeout. For more information, see Visibility Timeout in the Amazon Simple Queue Service Developer Guide.

    <important>

    If a caller of the ReceiveMessage action still processes messages when the visibility timeout expires and messages become visible, another worker consuming from the same queue can receive the same messages and therefore process duplicates. Also, if a consumer whose message processing time is longer than the visibility timeout tries to delete the processed messages, the action fails with an error.

    To mitigate this effect, ensure that your application observes a safe threshold before the visibility timeout expires and extend the visibility timeout as necessary.

    </important>

  • While messages with a particular MessageGroupId are invisible, no more messages belonging to the same MessageGroupId are returned until the visibility timeout expires. You can still receive messages with another MessageGroupId as long as it is also visible.

  • If a caller of ReceiveMessage can't track the ReceiveRequestAttemptId, no retries work until the original visibility timeout expires. As a result, delays might occur but the messages in the queue remain in a strict order.

The length of ReceiveRequestAttemptId is 128 characters. ReceiveRequestAttemptId can contain alphanumeric characters (a-z, A-Z, 0-9) and punctuation (!"#$%&'()*+,-./:;<=>?@[]^_`{|}~).

For best practices of using ReceiveRequestAttemptId, see Using the ReceiveRequestAttemptId Request Parameter in the Amazon Simple Queue Service Developer Guide.

Definition at line 964 of file ReceiveMessageRequest.h.

◆ WithVisibilityTimeout()

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithVisibilityTimeout ( int  value)
inline

The duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a ReceiveMessage request.

Definition at line 522 of file ReceiveMessageRequest.h.

◆ WithWaitTimeSeconds()

ReceiveMessageRequest& Aws::SQS::Model::ReceiveMessageRequest::WithWaitTimeSeconds ( int  value)
inline

The duration (in seconds) for which the call waits for a message to arrive in the queue before returning. If a message is available, the call returns sooner than WaitTimeSeconds. If no messages are available and the wait time expires, the call returns successfully with an empty list of messages.

Definition at line 555 of file ReceiveMessageRequest.h.


The documentation for this class was generated from the following file: