Delete a queue
Delete a queue and every message in it.
Last updated 18 November 2026View as Markdown
Replace my-queue with the name of your queue.
Warning
The queue's messages are deleted with it and cannot be recovered. From then on, sends to the queue
fail with QueueDoesNotExist.
Prerequisites
- Permission for
queue:DeleteQueueon the queue. For the console, alsoqueue:GetQueueAttributeson it, to open its page. - No other queue uses it as its dead-letter queue. Otherwise the delete is refused with
409"“my-queue-dlq” is the dead-letter queue of “my-queue”. Remove it there first.", and the console shows Delete queue as unavailable. Remove it from that queue first (see Set a dead-letter queue), or delete that queue first.
Delete the queue
- Open the queue, then choose Danger zone (or, in the ⋯ menu, Delete queue).
- Under Delete queue, choose Delete queue.
- In the dialog, enter the queue's name, and choose Delete queue.
The console returns to the queue list.
dcloud queue queues delete my-queueDELETE /queue/api/queues/my-queueThe answer is 200 with the deleted queue's name.
Remove the dcloud_queue resource from the configuration and apply, or run terraform destroy.
Result
The queue and its messages are gone. Messages it had moved to its dead-letter queue stay there, but a redrive can no longer send them back to it; redrive them to another queue instead (see Redrive a dead-letter queue).
When the delete is refused
409when another queue uses it as its dead-letter queue (see Prerequisites).404"There is no queue named “my-queue” here."
Related
Did this page help you?