Delete a message queue

Purpose

Deletes a specified message queue.

URI

Use the Eclipse Amlen REST API DELETE method with the following Eclipse Amlen configuration URI:

http://<admin-endpoint-IP:Port>/ima/v1/configuration/Queue/<NameOfQueue>?DiscardMessages=true|false

Where:
NameOfQueue
Required.
Specifies the name of the queue that you are deleting.
DiscardMessages=true|false
Optional.
Specifies whether any messages on the queue are discarded.
The default value is false.

Usage NotesĀ®

  • The REST method must be capitalized as shown.
  • You cannot delete a queue unless the queue is empty, or you discard the messages on the queue by specifying DiscardMessages=true.

Related REST Administration APIs

Example

The following example demonstrates deleting a queue named testQ by using cURL.

curl -X DELETE http://127.0.0.1:9089/ima/v1/configuration/Queue/testQ
The following shows an example response to the DELETE method.

{        
  "Version": "v1",
  "Code": "CWLNA6011",
  "Message": "The requested configuration change has completed successfully."
}