Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
5 changes: 5 additions & 0 deletions .changeset/twenty-bushes-enter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": minor
---

removing default values for message retention and updating description to reflect different message retention limits for free tier queues (between 60 and 86400 seconds if on free tier, otherwise must be between 60 and 1209600 seconds)
12 changes: 5 additions & 7 deletions packages/wrangler/src/__tests__/queues/queues.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,9 +196,6 @@ describe("wrangler", () => {
if (queueSettings?.delivery_delay === undefined) {
queueSettings.delivery_delay = 0;
}
Copy link
Contributor

@sdnts sdnts Feb 9, 2026

Choose a reason for hiding this comment

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

Can we make the same change for the delivery delay as well? (Maybe in a separate PR though)

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe #12279 is related to that?
@penalosa ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated the PR, description, and changeset to take out the delivery default as well

if (queueSettings?.message_retention_period === undefined) {
queueSettings.message_retention_period = 345600;
}

msw.use(
http.post(
Expand Down Expand Up @@ -252,8 +249,8 @@ describe("wrangler", () => {
-v, --version Show version number [boolean]

OPTIONS
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 42300 [number] [default: 0]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 1209600 [number] [default: 345600]"
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 43200 [number] [default: 0]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600 [number]"
`);
});
describe.each(["wrangler.json", "wrangler.toml"])("%s", (configPath) => {
Expand Down Expand Up @@ -303,6 +300,7 @@ describe("wrangler", () => {

it("should send queue settings with message retention period", async () => {
const requests = mockCreateRequest("testQueue", {
delivery_delay: 0,
message_retention_period: 100,
});
await runWrangler(
Expand Down Expand Up @@ -476,8 +474,8 @@ describe("wrangler", () => {
-v, --version Show version number [boolean]

OPTIONS
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 42300 [number]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 1209600 [number]"
--delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 43200 [number]
--message-retention-period-secs How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600 [number]"
`);
});

Expand Down
5 changes: 2 additions & 3 deletions packages/wrangler/src/queues/cli/commands/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ export const queuesCreateCommand = createCommand({
"delivery-delay-secs": {
type: "number",
describe:
"How long a published message should be delayed for, in seconds. Must be between 0 and 42300",
"How long a published message should be delayed for, in seconds. Must be between 0 and 43200",
default: 0,
},
"message-retention-period-secs": {
type: "number",
describe:
"How long to retain a message in the queue, in seconds. Must be between 60 and 1209600",
default: 345600,
"How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600",
},
},
positionalArgs: ["name"],
Expand Down
4 changes: 2 additions & 2 deletions packages/wrangler/src/queues/cli/commands/update.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ export const queuesUpdateCommand = createCommand({
"delivery-delay-secs": {
type: "number",
describe:
"How long a published message should be delayed for, in seconds. Must be between 0 and 42300",
"How long a published message should be delayed for, in seconds. Must be between 0 and 43200",
},
"message-retention-period-secs": {
type: "number",
describe:
"How long to retain a message in the queue, in seconds. Must be between 60 and 1209600",
"How long to retain a message in the queue, in seconds. Must be between 60 and 86400 if on free tier, otherwise must be between 60 and 1209600",
},
},
positionalArgs: ["name"],
Expand Down
Loading