Delete a Queue

delete

/queues/{queueName}

Set the status of the queue with the given name to MARK_FOR_DELETION.  Deleting a queue is a non-blocking operation.  The operation to delete it returns immediately, but the queue may continue to exist in the MARK_FOR_DELETION status for a period of time. 

Request

Path Parameters
Back to Top

Response

204 Response

Queue was put in the MARK_FOR_DELETION state.

404 Response

The queue with the name supplied was not found.

Back to Top

Examples

cURL Command

cookie=/tmp/messaging-cookie
curl -s -u $USER:$PASS -c $cookie -b $cookie \
     -H "X-OC-ID-TOKEN-STATUS: disabled" \
     -X DELETE "https://messaging.us2.oraclecloud.com/myService-myTenant/api/v1/queues/myFirstQueue"

There is no request body to submit with the HTTP request and there is no response body.

 

This section provides information about what happens when a client is using, or attempts to use, a non-temporary destination (queue or topic) that is deleted.

Deleting a non-temporary destination is a non-blocking operation.  The operation of deleting a destination (either through the REST API or through the Java library) can complete and return control to the client, and the destination can still be in the process of being deleted.  Destinations that are in the process of being deleted, but whose deletion is not yet complete, are referred to as being marked for deletion.  Destinations that are marked for deletion will still be listed when all destinations are listed, and their properties can still be retrieved.  They will, however, have status MARK_FOR_DELETION.  A destination can have status MARK_FOR_DELETION for some time.

Any use of a destination that is marked for deletion may fail.  This includes sending to it, receiving from it, browsing it (if it is a queue), creating message push listeners on it, having a message push listener push messages from it or to it, etc.  This applies both to attempts to use the destination after it is marked for deletion and uses of the destination that began before it was marked for deletion.  Sends to a destination that is marked for deletion may succeed or fail.  Messages on or sent to a destination that is marked for deletion may or may not be lost.  It is recommended that applications be implemented so as to avoid making any use of destinations that are marked for deletion, for example, by using a fixed set of destinations that does not change over time, shutting down all uses of a destination before deleting it, etc.

Message push listeners that listen on a destination that becomes marked for deletion will be deleted automatically.  Applications that might be sensitive to the exact time that a message push listener is deleted after its destination is marked for deletion should delete the message push listeners on a destination manually before deleting the destination.

Message push listeners that push to a destination that is marked for deletion or fully deleted will not be deleted automatically when that destination is deleted.  Any message push listener that pushes to a destination that might be deleted while the message push listener still exists should be configured with a failure policy that ensures that messages will not be lost if the target destination is deleted.

Back to Top