This is a demo of Cloudflare Queues which can run on your local machine.
Cloudflare Queues allows you to send and receive messages with guaranteed delivery. It integrates with Cloudflare Workers and offers at-least once delivery, message batching, and does not charge for egress bandwidth.
First, install the dependencies using npm
. This includes a custom release of wrangler
which contains the preview for Queues. Then, run the start
command which will spin up a development server on localhost:8787
.
npm install
npm run start
You can send requests to the server which will forward them to a Queue.
curl http://localhost:8787/hello-world
curl http://localhost:8787/ -d "this is a message"
If you want to test a batch of messages, you can also run the load
command:
npm run load
- Cloudflare Queues blog post
- Cloudflare Queues documentation
- Sign up for the Private Beta
- So you can deploy to Cloudflare's network, instead of just your local machine!