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). Queues can delete a message from a queue even if a visibility timeout setting causes the message to be locked by another consumer. Queues automatically deletes messages left in a queue longer than the retention period configured for the queue.

Example

Use a bare-bones client and the command you need to make an API call.

import { QueuesClient, DeleteMessageCommand } from "@stedi/sdk-client-queues"; // ES Modules import
// const { QueuesClient, DeleteMessageCommand } = require("@stedi/sdk-client-queues"); // CommonJS import
const client = new QueuesClient(config);
const input = { // DeleteMessageInput
queueUrl: "STRING_VALUE", // required
receiptHandle: "STRING_VALUE", // required
};
const command = new DeleteMessageCommand(input);
const response = await client.send(command);
// {};

Param

DeleteMessageCommandInput

Returns

DeleteMessageCommandOutput

See

Throws

AccessDeniedException (client fault)

Throws

ProductUnavailableException (client fault)

Throws

ResourceAlreadyExistsException (client fault)

Throws

ResourceNotFoundException (client fault)

Throws

ResourceUnderChangeException (client fault)

Throws

ServiceException (server fault)

Throws

QueuesServiceException

Base exception class for all service exceptions from Queues service.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

Methods

  • Returns EndpointParameterInstructions