Skip to content

Commit 396a7c9

Browse files
committed
Added documentation to pause queues
1 parent 1e30bfb commit 396a7c9

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: Pause delivery
3+
pcx_content_type: concept
4+
sidebar:
5+
order: 2
6+
---
7+
import { WranglerConfig, Type, MetaInfo } from "~/components";
8+
9+
10+
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.
11+
12+
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.
13+
14+
Pausing affects both [push-based consumer workers](/queues/reference/how-queues-works#consumers), and [pull based consumers](/queues/configuration/pull-consumers).
15+
16+
### Pause and resume delivery using Wrangler
17+
The following command will pause message delivery from your queue:
18+
```sh
19+
$ npx run wrangler queues pause-delivery <QUEUE-NAME>
20+
```
21+
- `queue-name` <Type text="string" /> <MetaInfo text="required" />
22+
- The name of the queue which delivery should be paused.
23+
24+
The following command will resume message delivery:
25+
```sh
26+
$ npx run wrangler queues resume-delivery <QUEUE-NAME>
27+
```
28+
- `queue-name` <Type text="string" /> <MetaInfo text="required" />
29+
- The name of the queue from which delivery should be resumed.
30+
31+
### Using HTTP Pull consumers with a paused queue
32+
When a queue is paused, messages cannot be pulled by an [HTTP pull based consumer](/queues/configuration/pull-consumers). Requests to pull messages will receive a `409` response, along with an error message stating `queue_delivery_paused`.

0 commit comments

Comments
 (0)