workerd error: queue binding consumer not found for producer
Fixes Workers Queues where the producer sends but no consumer ever runs. This skill shows how to match the queue name exactly between the producer binding and the consumer config, verify the queue exists, and confirm the consumer exports a queue handler. Use it when messages go out but nothing is consumed.
Fix queue binding consumer not found for producer
TL;DR
The queue name in the producer binding and the queue name in the consumer config must match exactly, and the consumer worker must export a queue(batch, env) handler. Producers and consumers are linked purely by that name string, so a typo orphans the producer and nothing ever runs. Fix the name, redeploy both sides, and send a test message.
Verbatim error
workerd error: queue binding consumer not found for producerSteps
- Open the producer's wrangler.toml and note the
[[queues.producers]]entry: itsbindingname and itsqueuename. Expected: you have the exact queue name recorded. - Open the consumer's wrangler.toml and note the
[[queues.consumers]]queuename. Expected: comparing the two usually reveals the typo or rename. - Make the names identical (they are case-sensitive). Expected: both sides reference the same queue string.
- Confirm the consumer worker exports
async queue(batch, env). Expected: the handler is present and exported. - Confirm the queue exists:
npx wrangler queues list. Expected: the queue name appears in the list. - Redeploy the consumer, then send a test message from the producer. Expected: the batch arrives and the consumer's logs run.
Use this when
- "queue binding consumer not found for producer" appears in logs
- The producer sends messages but the consumer never fires
- A queue was renamed and one side was not updated
Not for this skill when
- Messages are consumed but the handler fails (check batch retry and DLQ settings)
- The queue was deleted (recreate it first)
- The problem is dead-letter queue routing rather than discovery
Variant phrasings
- workers queues consumer not found
- queue() handler never called
- producer binding queue name mismatch
- cloudflare queue messages never delivered
Why it happens
Producers and consumers are linked by nothing but the queue name string in each wrangler.toml. A typo, a rename applied to only one side, or a consumer config deployed to the wrong worker leaves the producer pointing at a queue with no consumer attached, so messages pile up and nothing runs.
Edge cases
- A consumer on a different worker needs that worker deployed with the consumer config; deploying only the producer changes nothing.
max_batch_sizeandmax_batch_timeouttune delivery timing, not discovery; they will not fix a missing consumer.- Deleting and recreating a queue with the same name is fine; the binding follows the name.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_NRv-QkaHyV7TgJCvjbaWog
Maintainer review
No maintainer verification is recorded for this version.
This records the version a maintainer checked. It does not assert that the version is the latest upstream release.