# How to Build Event-Driven Applications: Cloudflare Queues

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

[Cloudflare Developers](https://www.youtube.com/@CloudflareDevelopers) · Published 2024-09-26 · 5:19 · B tier · Cloudflare

[Watch on YouTube](https://www.youtube.com/watch?v=HXOpxNaKUzw) · [All RatTube videos](/tube)

## Summary

The video builds an event-driven shop with [Cloudflare Queues](/lore/queues-pipelines-workflows-and-k2-do-different-jobs). Signup and order requests send messages so welcome and confirmation emails can run away from the request's critical path.

Consumer Workers read the messages, fetch user and product information, and build the emails. Successful processing acknowledges the message. The walkthrough also shows the error path that requests [another delivery](/lore/retry-needs-idempotency) instead of acknowledging unfinished work.

## Section notes

- [0:09](https://www.youtube.com/watch?v=HXOpxNaKUzw\&t=9s): Email work motivates moving events away from the request path.
- [0:52](https://www.youtube.com/watch?v=HXOpxNaKUzw\&t=52s): The shop demonstration begins with signup and a new-user event.
- [1:54](https://www.youtube.com/watch?v=HXOpxNaKUzw\&t=114s): A consumer reads user information and sends a welcome email.
- [2:48](https://www.youtube.com/watch?v=HXOpxNaKUzw\&t=168s): The order endpoint sends order details to a queue.
- [3:41](https://www.youtube.com/watch?v=HXOpxNaKUzw\&t=221s): The consumer builds a confirmation email and acknowledges success or handles failure.

## Key concepts

- [Cloudflare Queues](/lore/queues-pipelines-workflows-and-k2-do-different-jobs)
- [another delivery](/lore/retry-needs-idempotency)

## Our take

Builds an event-driven app with Cloudflare Queues, moving slow work such as sending email out of the request path so each part scales on its own.

## Related videos

- [Cloudflare Workflows: The Newest Developer Platform Primitive at Cloudflare](/tube/cloudflare-workflows-developer-platform-primitive)
- [Cloudflare Workflows Just Got A Lot Better!](/tube/cloudflare-workflows-got-better)
- [Durable Objects Finally Make Sense](/tube/durable-objects-finally-make-sense)
- [Cloudflare Workers Explained](/tube/cloudflare-workers-explained)

Summary based on the transcript. Written 2026-11-15.
