Electroid / queues-demo

A demo of Cloudflare Queues

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cloudflare Queues Demo

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.

Get started

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

Learn more

About

A demo of Cloudflare Queues

License:MIT License


Languages

Language:TypeScript 94.0%Language:Shell 6.0%