Struct aws_sdk_sqs::client::fluent_builders::DeleteMessage
source · pub struct DeleteMessage { /* private fields */ }
Expand description
Fluent builder constructing a request to DeleteMessage
.
Deletes the specified message from the specified queue. To select the message to delete, use the ReceiptHandle
of the message (not the MessageId
which you receive when you send the message). Amazon SQS can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Amazon SQS automatically deletes messages left in a queue longer than the retention period configured for the queue.
The ReceiptHandle
is associated with a specific instance of receiving a message. If you receive a message more than once, the ReceiptHandle
is different each time you receive a message. When you use the DeleteMessage
action, you must provide the most recently received ReceiptHandle
for the message (otherwise, the request succeeds, but the message might not be deleted).
For standard queues, it is possible to receive a message even after you delete it. This might happen on rare occasions if one of the servers which stores a copy of the message is unavailable when you send the request to delete the message. The copy remains on the server and might be returned to you during a subsequent receive request. You should ensure that your application is idempotent, so that receiving a message more than once does not cause issues.
Implementations§
source§impl DeleteMessage
impl DeleteMessage
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<DeleteMessage, AwsResponseRetryClassifier>, SdkError<DeleteMessageError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<DeleteMessage, AwsResponseRetryClassifier>, SdkError<DeleteMessageError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<DeleteMessageOutput, SdkError<DeleteMessageError>>
pub async fn send(
self
) -> Result<DeleteMessageOutput, SdkError<DeleteMessageError>>
Sends the request and returns the response.
If an error occurs, an SdkError
will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn queue_url(self, input: impl Into<String>) -> Self
pub fn queue_url(self, input: impl Into<String>) -> Self
The URL of the Amazon SQS queue from which messages are deleted.
Queue URLs and names are case-sensitive.
sourcepub fn set_queue_url(self, input: Option<String>) -> Self
pub fn set_queue_url(self, input: Option<String>) -> Self
The URL of the Amazon SQS queue from which messages are deleted.
Queue URLs and names are case-sensitive.
sourcepub fn receipt_handle(self, input: impl Into<String>) -> Self
pub fn receipt_handle(self, input: impl Into<String>) -> Self
The receipt handle associated with the message to delete.
sourcepub fn set_receipt_handle(self, input: Option<String>) -> Self
pub fn set_receipt_handle(self, input: Option<String>) -> Self
The receipt handle associated with the message to delete.
Trait Implementations§
source§impl Clone for DeleteMessage
impl Clone for DeleteMessage
source§fn clone(&self) -> DeleteMessage
fn clone(&self) -> DeleteMessage
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more