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

    1. Open the navigation menu and click Developer Services. Under Application Integration, click Queues.
    2. On the left side of the screen, click Queues.
    3. In the list of existing queues, click the name of a queue to display its details page.
    4. In the Messages section, click Poll for messages.
    5. Click Continue.
    6. In the Messages section, select the messages to delete.
    7. Click Actions, and then select Delete selected messages.
    8. Confirm when prompted.

    Purge a Queue

    1. Open the navigation menu and click Developer Services. Under Application Integration, click Queues.
    2. On the left side of the screen, click Queues.
    3. In the list of existing queues, click the name of a queue to display its details page.
    4. Click Purge queue or Purge DLQ.
    5. Confirm the action and then click Purge.

    Purge a Channel

    1. Open the navigation menu and click Developer Services. Under Application Integration, click Queues.
    2. On the left side of the screen, click Queues.
    3. In the list of existing queues, click the name of a queue to display its details page.
    4. Under Resources, click Channels.
    5. Click the the Actions menu (Actions Menu) for the channel that you want to purge and select Purge Channel.
    6. 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.