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.

    1. 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.
    2. On the details page for the queue, select Messages.
    3. From the Actions menu for the queue, select Purge queue or Purge DLQ.
    4. Confirm the action and then 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.