Queue names aren't scoped per Worker/environment, so staging and production collide in one Cloudflare account

Closed
#547 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Brooooooklyn is already working on this.

Since Oct 26, 2026.

  • #597 by @Brooooooklyn — merged

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
46/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
typescript

Research direction

Start in packages/void/src/cli/deploy-resources.ts and trace how desired.queues is built from analysis.queues and how suffixedResourceName is used for other resources. Check how void.config.ts queue declarations are handled. Done means staging and production deployments in one Cloudflare account get distinct queue names or can map logical names per environment, with their consumers bound to the intended queues.

Written by the indexing model from the issue text.

Description

Summary

Queue names come straight from file paths (queues/emails.ts → emails) and get no Worker or environment suffix. Cloudflare queue names are unique per account, so two deployments of the same app in one account, such as staging and production, share or fight over the same queues.

Other resources don't have this problem. For example, R2 buckets get a Worker-scoped name through suffixedResourceName(workerName, 'storage'), but queues use the bare name (packages/void/src/cli/deploy-resources.ts, desired.queues = analysis.queues.map((q) => q.name), still present in v1.2.1).

Repro

  1. An app with queues/jobs.ts.
  2. Deploy it as app-staging and as app-production in the same Cloudflare account.
  3. Both Workers bind the single jobs queue. Staging's producer messages can reach production's consumer, and a queue can have only one consumer Worker, so the second deploy either takes over the consumer or fails.

We also tried to declare environment-specific queues ourselves under cloudflare in void.config.ts, but Void refused that, so there's no way around it from the app.

Expected

One of these:

  • Prefix or suffix queue names with the Worker or environment name, as other provisioned resources already do (for example app-staging-jobs), or
  • An explicit mapping in void.config.ts from logical queue name to Cloudflare queue name, per environment.

The common setup this blocks is staging and production in one Cloudflare account.

Seen on 1.1.12, still present in 1.2.1.

Dominant language
TypeScript
Stars
627
Forks
66
Avg merge
14h 56m
Merged PRs (30d)
170

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from voidzero-dev/void

All issues in voidzero-dev/void

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.