To develop locally with Queues, you will need:
Start a local development session
Open your terminal and run the following commands to start a local development session:
# Confirm we are using wrangler v3.1.0+$ wrangler --version⛅️ wrangler 3.1.0# Start a local dev session:$ wrangler dev# Outputs:------------------wrangler dev now uses local mode by default, powered by 🔥 Miniflare and 👷 workerd.To run an edge preview session for your Worker, use wrangler dev --remote⎔ Starting local server...[mf:inf] Ready on http://127.0.0.1:8787/
Local development sessions create a standalone, local-only environment that mirrors the production environment Queues runs in so you can test your Workers before you deploy to production.
Wrangler does not yet support running separate producer and consumer Workers bound to the same Queue locally. To develop locally with Queues, you can temporarily put your consumer’s
queue() handler in the same Worker as your producer, so the same Worker acts as both a producer and consumer.
Wrangler also does not yet support
wrangler dev --remote.