Deleting Messages
Delete individual messages, many messages, or purge all messages from a queue or channel. When you purge a queue, any existing channels are also purged.
The DeleteMessage
and DeleteMessages
requests require the receipt
of the message retrieved from a GetMessages
request.
You can use the Console to delete individual messages from a queue or entirely purge a queue.
Delete Selected Messages from a Queue
- On the Queues list page, select the queue that you want to work with. If you need help finding the list page or the queue, see Listing Queues.
- On the details page for the queue, select Messages.
- Select Poll for messages.
- Select Continue.
- In the Messages section, select the messages to delete.
- Select Delete selected messages.
- Confirm when prompted.
Purge a Queue
- On the Queues list page, select the queue that you want to work with. If you need help finding the list page or the queue, see Listing Queues.
- On the details page for the queue, select Messages.
- Select More actions and then select Purge queue or Purge DLQ.
- Confirm the action and then select Purge.
Purge a Channel
- On the Queues list page, select the queue that you want to work with. If you need help finding the list page or the queue, see Listing Queues.
- On the details page for the queue, select Channels.
- From the Actions menu for the queue, select Purge Channel.
- Confirm the action and select Purge.
Use the
oci queue messages delete-message
command to delete a single message from the queue.oci queue messages delete-message --message-receipt <message_receipt> --queue-id <queue_OCID>
Use the
oci queue messages delete-messages
command to delete messages from the queue.oci queue messages delete-messages --entries file://entries.json --queue-id <queue_OCID>
Use the
oci queue queue-admin queue purge
command to delete all messages in a queue or channel.oci queue queue-admin queue purge --purge-type <purge_type> --queue-id <queue_OCID> --channel-id <channel_id>
For a complete list of parameters and values for CLI commands, see the CLI Command Reference.
Use the DeleteMessage or DeleteMessages operation to delete messages from a queue.
Use PurgeQueue to delete all messages in a queue or channel.
For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.