Wrangler app that uses a Durable Object to publish messages to a queue.
- Cloudflare:
- Must have set the
CLOUDFLARE_API_TOKENvariable in your local environment.
- Must have set the
- pnpm:
- Must be installed in your system.
- Wrangler:
- Must be installed in your system.
Create queue:
npx wrangler queues create my-queueCreate worker:
npx wrangler deploy-
Grab the
<WORKER_ROUTE_TRIGGER_URL>from the deployment outputs:Published my-worker <WORKER_ROUTE_TRIGGER_URL> Producer for my-queue
-
Navigate to
https://my-worker.<SUBDOMAIN>.workers.dev?userId=test. -
Check that a message is present in
my-queuefrom the Cloudflare dashboard.
npx wrangler delete