Devflare Docs
Under the hood Bindings

How Devflare wires Queues from config to runtime

Queue config is compiled into explicit producer and consumer blocks, with preview resource materialization available for both queue names and DLQs.

This is one of the clearer compiler paths in Devflare: producers become env bindings, consumers become worker-side queue listeners, and preview lifecycle code can materialize names when the preview should own separate queues.

Normalization
Producer and consumer config is split into one normalized queue model before compile
Compile target
Wrangler and
Preview note
Preview queue names and DLQs can be provisioned and cleaned up when the preview owns them

Devflare normalizes the authored shape before it does anything louder

Devflare does not treat queue producers and queue consumers as unrelated configuration fragments. It keeps them in one coherent config namespace so later compile and preview code can see the whole story.

That is why review and runtime stay aligned: the config already names the queue, the producer binding, the consumer, and the dead-letter relationship in one place.

Queues from authored config to generated output

Keep the binding readable in source, then inspect only the Wrangler-facing slice Devflare emits when the config is compiled.

Local runtime support depends on what Devflare can model directly

  • The local harness can stand up queue producers as real env bindings and trigger the queue handler through test helpers.
  • Queue helper behavior is different from plain worker fetch behavior because waits for queued background work before returning.
  • That makes queue tests a good place to assert post-processing side effects directly.

Compile, preview, and cleanup behavior

  • Compile converts consumer options into the output shape Wrangler expects, including retry and dead-letter fields.
  • Preview materialization can generate branch-specific queue and DLQ names when the preview environment should own separate async infrastructure.
  • This lifecycle support covers queue resources more directly than service bindings, which mostly stay name-based references.

Queues stay reviewable when the config stays explicit

The combination of producers, consumers, and dead-letter settings is much easier to trust when it lives in one visible authored shape.

Previous

Queues

Devflare models Queue producers and consumers explicitly, which makes local tests and preview naming much easier to reason about.

Next

Testing Queues

Queue testing is one of the places where Devflare’s helper surface feels especially good because the queue trigger already knows how to drive the real handler shape.