Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
title: Increased limits for Queues pull consumers
description: Queues now supports consuming up to 5,000 messages per second per queue over HTTP.
products:
- queues
date: 2025-04-17 12:00:00 UTC
---

[Queues pull consumers](/queues/configuration/pull-consumers/) can now pull and acknowledge up to **5,000 messages per second per queue**. Previously, pull consumers were rate limited to 1200 requests / 5 minutes, aggregated across all queues.

Pull consumers allow you to consume messages over HTTP from any environment—including outside of [Cloudflare Workers](/workers). They’re also useful when you need fine-grained control over how quickly messages are consumed.

To setup a new queue with a pull based consumer using [Wrangler](/workers/wrangler/), run:
```bash title="Create a queue with a pull based consumer"
$ npx wrangler queues create my-queue
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$ npx wrangler queues consumer http add my-queue
```
You can also configure a pull consumer using the [REST API](/api/resources/queues/subresources/consumers/methods/create/) or the Queues dashboard.

Once configured, you can pull messages from the queue using any HTTP client. You'll need a [Cloudflare API Token](/fundamentals/api/get-started/create-token/) with `queues_read` and `queues_write` permissions. For example:
```bash title="Pull messages from a queue"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May want to move this to our APIRequest component

curl "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/queues/${QUEUE_ID}/messages/pull" \
--header "Authorization: Bearer ${API_TOKEN}" \
--header "Content-Type: application/json" \
--data '{ "visibility_timeout": 10000, "batch_size": 2 }'
```

To learn more about how to acknowledge messages, pull batches at once, and setup multiple consumers, refer to the [pull consumer documentation](/queues/configuration/pull-consumers).

As always, Queues doesn't charge for data egress. Pull operations continue to be billed at the [existing rate](/queues/platform/pricing), of $0.40 / million operations. The increased limits are available now, on all new and existing queues. If you're new to Queues, [get started with the Cloudflare Queues guide](/queues/get-started).
4 changes: 2 additions & 2 deletions src/content/docs/queues/configuration/pull-consumers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ curl "https://api.cloudflare.com/client/v4/accounts/${CF_ACCOUNT_ID}/queues/${QU
--data '{ "visibility_timeout": 10000, "batch_size": 2 }'
```

You may authenticate and run multiple concurrent pull-based consumers against a single queue, noting that all consumers will share the same [rate limit](/queues/platform/limits/) against the Cloudflare API.
You may authenticate and run multiple concurrent pull-based consumers against a single queue.

### Create API tokens

Expand Down Expand Up @@ -248,7 +248,7 @@ Additionally:

- You should provide every `lease_id` in the request to the `/ack` endpoint if you are processing those messages in your consumer. If you do not acknowledge a message, it will be marked for re-delivery (put back in the queue).
- You can optionally mark messages to be retried: for example, if there is an error processing the message or you have upstream resource pressure. Explicitly marking a message for retry will place it back into the queue immediately, instead of waiting for a (potentially long) `visibility_timeout` to be reached.
- You can make multiple calls to the `/ack` endpoint as you make progress through a batch of messages, but we recommend grouping acknowledgements to avoid hitting [API rate limits](/queues/platform/limits/).
- You can make multiple calls to the `/ack` endpoint as you make progress through a batch of messages, but we recommend grouping acknowledgements to reduce the number of API calls required.

Queues aims to be permissive when it comes to lease IDs: if a consumer acknowledges a message by its lease ID _after_ the visibility timeout is reached, Queues will still accept that acknowledgment. If the message was delivered to another consumer during the intervening period, it will also be able to acknowledge the message without an error.

Expand Down
5 changes: 3 additions & 2 deletions src/content/docs/queues/platform/limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ import { Render, WranglerConfig } from "~/components"
| [Consumer CPU time](/workers/platform/limits/#cpu-time)| 30 seconds (default). [Configurable to 5 minutes](/queues/platform/limits/#increasing-queue-consumer-worker-cpu-limits) |
| `visibilityTimeout` (pull-based queues) | 12 hours |
| `delaySeconds` (when sending or retrying) | 12 hours |
| Requests to the Queues API (incl. pulls/acks) | [1200 requests / 5 mins](/fundamentals/api/reference/limits/) |

| Requests to the Queues API (excluding pull consumer operations)<sup>6</sup> | [1200 requests / 5 mins](/fundamentals/api/reference/limits/) |


<sup>1</sup> 1 KB is measured as 1000 bytes. Messages can include up to \~100 bytes of internal metadata that counts towards total message limits.
Expand All @@ -39,6 +38,8 @@ import { Render, WranglerConfig } from "~/components"

<sup>5</sup> Refer to [Workers limits](/workers/platform/limits/#cpu-time).

<sup>6</sup> [Pull Consumers](/queues/configuration/pull-consumers) allow you to consume messages from a queue over HTTP. Pulls, acknowledgements, and retries over HTTP are not subject to the API rate limit.

<Render file="limits_increase" product="workers" />

### Increasing Queue Consumer Worker CPU Limits
Expand Down
6 changes: 6 additions & 0 deletions src/content/release-notes/queues.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ productLink: "/queues/"
productArea: Developer platform
productAreaLink: /workers/platform/changelog/platform/
entries:
- publish_date: "2025-04-17"
title: Improved limits for pull consumers
description: |-
[Queues Pull Consumers](/queues/configuration/pull-consumers/) can now pull and acknowledge up to 5,000 messages per second per queue. Previously, pull consumers were rate limited to 1200 requests / 5 minutes, aggregated across all queues.

Refer to the [documentation on pull consumers](/queues/configuration/pull-consumers/) to learn how to setup a pull consumer, acknowledge / retry messages, and setup multiple consumers.
- publish_date: "2025-03-27"
title: Pause delivery and purge queues
description: |-
Expand Down