Cloudflare

Cloudflare Queues: messages at your speed with consumer concurrency and explicit acknowledgement

May 19, 2023Charles Burnett, Josh Wheeler
Cloudflare Queues: messages at your speed with consumer concurrency and explicit acknowledgement
SummaryAI, from the source post

This post introduces two key enhancements to Cloudflare Queues: Consumer Concurrency and Explicit Acknowledgment. Consumer Concurrency automatically scales the number of consumers to match the rate of incoming messages, preventing backlogs. It autoscales based on queue size, message rate, and consumption success/failure, with a configurable `max_concurrency`. Explicit Acknowledgment allows consumers to individually acknowledge or retry messages within a batch, preventing reprocessing of successfully processed messages when a batch fails. This is achieved through new methods like `.ack()`, `.retry()`, `.ackAll()`, and `.retryAll()`. The post also mentions a quadrupling of message throughput, from 100 to over 400 messages per second, and outlines future plans for R2 as a direct consumer and an HTTP pull API.

More from the Asynchronous Messaging & Queuing trail