Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
title: Customize Queue message retention periods
description: Customize the retention period for a queue, starting from 60 seconds to a maximum of 14 days.
products:
- queues
date: 2025-02-13 12:00:00 UTC
---

You can customize a Queue's message retention period, starting from 60s to a maximum of 14 days.

![Customize a Queue's message retention period](~/assets/images/queues/customize-retention-period.png)

By default, Queues retain messages for a default of 4 days. Previously, it was impossible to change the retention period.

With this update, you can retain messages for up to 14 days. Or if you want your consumer to only consume newer messages, you can set the message expiry period to be as short as 60 seconds.

You can customize the retention period on the Queues settings page on the dashboard, or using Wrangler:
```bash title="Update message retention period"
$ wrangler queues update my-queue --message-retention-period 5d
Copy link
Contributor

Choose a reason for hiding this comment

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

No way to do infrastructure-as-code or persist this configuration anywhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

None (yet) alas. Queue level config can't live in a wrangler.toml because multiple workers could bind to the same Queue.

```

This feature is available on all new and existing Queues. If you haven't used Cloudflare Queues before, [get started with our guide here](/queues/get-started).
Loading