Skip to content

Pause delivery

You can pause delivery of messages from your Queue to any connected consumers. Pausing a queue is useful to manage downtime (such as if your consumer Worker is unhealthy), without losing any messages.

Queues continue to receive and store messages even while delivery is paused. Messages in a paused queue are still subject to expiry, if the messages become older than the queue message retention period.

Pausing affects both push-based consumer Workers, and pull based consumers.

Pause and resume delivery using Wrangler

The following command will pause message delivery from your queue:

Terminal window
$ npx run wrangler queues pause-delivery <QUEUE-NAME>
  • queue-name string required
    • The name of the queue which delivery should be paused.

The following command will resume message delivery:

Terminal window
$ npx run wrangler queues resume-delivery <QUEUE-NAME>
  • queue-name string required
    • The name of the queue from which delivery should be resumed.

Using HTTP Pull consumers with a paused queue

When a queue is paused, messages cannot be pulled by an HTTP pull based consumer. Requests to pull messages will receive a 409 response, along with an error message stating queue_delivery_paused.