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
- Open the navigation menu and click Developer Services. Under Application Integration, click Queues.
- On the left side of the screen, click Queues.
- In the list of existing queues, click the name of a queue to display its details page.
- In the Messages section, click Poll for messages.
- Click Continue.
- In the Messages section, select the messages to delete.
- Click Actions, and then select Delete selected messages.
- Confirm when prompted.
Purge a Queue
- Open the navigation menu and click Developer Services. Under Application Integration, click Queues.
- On the left side of the screen, click Queues.
- In the list of existing queues, click the name of a queue to display its details page.
- Click Purge queue or Purge DLQ.
- Confirm the action and then click Purge.
Purge a Channel
- Open the navigation menu and click Developer Services. Under Application Integration, click Queues.
- On the left side of the screen, click Queues.
- In the list of existing queues, click the name of a queue to display its details page.
- Under Resources, click Channels.
- Click the the for the channel that you want to purge and select Purge Channel.
- Confirm the action and click 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.