All docs / Connect
Queues
Hand work to the background so requests stay fast; failed messages are retried and kept.
Open in the consoleA queue holds messages until a consumer app processes them. Your request handler sends a message and answers at once; the slow part (sending email, resizing an image, calling a partner API) happens in the background.
Send messages
"queues": { "producers": [{ "binding": "JOBS", "queue": "jobs" }] }await env.JOBS.send({ type: "welcome-email", userId });
await env.JOBS.sendBatch([{ body: a }, { body: b }]);
await env.JOBS.send(payload, { delaySeconds: 60 });Consume them
Set an app as the queue's consumer on the queue's page (or rr queues create jobs --consumer my-worker) and export a queue handler: