Skip to Content

Configure a consumer

Process agent events and background work reliablyBeta

Handle a message

const { messageId } =awaitsend('orders', {

});

Send messages for agent events and background work to durable topics, then process them with independent consumers, automatic retries, and at-least-once delivery.

status:'ready',

console.log(messageId);

orderId:'order_123',

import { send } from'@vercel/queue';

Betaon all plans


Each Vercel Queues topic is a durable, append-only log that retains messages until they expire. Messages fan out to every consumer group subscribed to the topic, and new consumer groups can join at any time to replay non-expired history.

Vercel Queues is useful when you need to:

  • Defer expensive work: Offload tasks like sending emails, generating PDFs, or calling external APIs so your response returns fast.
  • Absorb traffic spikes: Buffer incoming requests and process them at a controlled rate.
  • Retry failed work: Redeliver messages after a consumer crashes or a deployment rolls out, until the handler succeeds or the message expires.
  • Schedule tasks: Delay message delivery by up to the retention period.
  • Deduplicate publishes: Use idempotency keys to drop repeated publishes during the message's retention period.
  • Isolate consumers: Process the same messages in multiple independent pipelines without interference.
  • Replay agent activity: Give each viewer an independent replay of an agent's file edits, terminal commands, and tool calls.

Vercel Queues is the lower-level primitive that powers Vercel Workflows. Workflows provides a higher-level SDK with durable steps, sleep, and hooks that makes building multi-step applications more ergonomic. If you need direct control over message publishing, consumption, and routing, use the Queues SDK directly. If you're building stateful multi-step workflows, start with Workflows.

Features

  • Durable delivery: Persist messages with retries and visibility timeouts for reliable processing.
  • Fan-out consumers: Send one message stream to multiple independent consumer groups without coordination.
  • Push and poll modes: Process on Vercel with push callbacks or run your own workers.
  • Automatic scaling: Scale producers and consumers without managing partitions or throughput capacity.
  • SDK and API: Publish and consume with the SDK or HTTP API.
  • Observability: Monitor queue throughput, message age, and consumer performance.

Resources

Cross-link map: Vercel Queues (/docs/queues)From the Vercel docs graph (built 2026-09-21T05:26:59.511Z), spanning vercel.com docs + KB, nextjs.org, ai-sdk.dev, and other Vercel documentation sites. Full graph as JSON: https://vercel.com/docs/graph.jsonSemantically closest pagesVercel Queues now in public betaVercel Queues: JS SDK Reference — Publish and consume messages with the Vercel Queues SDK for JavaScript and TypeScript.Queues concepts — Learn delivery, retries, visibility timeouts, and deployment isolation in Vercel Queues.Quickstart — Set up Vercel Queues with the SDK.Vercel Queues is now in Limited BetaThis page links to (9)API Reference — HTTP API reference for Vercel Queues. Publish, consume, acknowledge, and manage messages.Queues concepts — Learn delivery, retries, visibility timeouts, and deployment isolation in Vercel Queues.Queues Observability — Monitor queue throughput, message age, retries, and consumer performance to optimize your queue-based workflows.Poll Mode — Consume messages from Vercel Queues by polling on your own schedule, from any environment.Pricing and Limits — Understand how Vercel Queues billing works, what's included, and which service limits apply.Vercel Queues: Python SDK Reference — Publish and consume messages with the Vercel Queues Python SDK.Quickstart — Set up Vercel Queues with the SDK.Vercel Queues: JS SDK Reference — Publish and consume messages with the Vercel Queues SDK for JavaScript and TypeScript.Vercel Workflows — Build agents and applications that retry failed steps, wait for external events, and resume across crashes and deploymenPages that link here (48)By site: vercel-changelog (5) · vercel-kb (31) · vercel-web (3) · workflow (1) · vercel-docs (8)From vercel-changelogBuild with OpenAI Agents API on VercelVercel Queues now supports 7-day message TTLRun background tasks with Celery on VercelVercel Functions can now run up to 30 minutesVercel Queues now in public betaFrom vercel-kbHow to architect an AI evaluation dashboard on Vercel — Map eval orchestration, traces, and run storage to AI Gateway, Observability, and Marketplace Postgres, and learn when sAstro on Vercel vs Webflow Cloud — Compare running Astro on Vercel Functions with Fluid compute against Webflow Cloud on Cloudflare Workers. Learn how AstrBuilding an AI chat app with RAG and source citations on Vercel — A production stack for AI chat with retrieval, reranking, source citations, and background ingestion on Vercel using NexDeploy PHP on Vercel with Docker — Build a PHP application with FrankenPHP and Docker, then deploy it to Vercel Functions with managed configuration, storaHow Docker Compose concepts map to Vercel — Translate your Docker Compose file to Vercel: Compose services become Vercel Services, networks become bindings, and volHow to build a durable AI code agent on Vercel — Build an AI agent that generates code, writes its own tests, and executes them in an isolated microVM with automatic retHow to move from time-based to on-demand revalidation — Replace fixed revalidation timers with scoped updates triggered by changes to content, product data, or other applicatioHow to run background jobs in Next.js — Learn the durable way to run background jobs in Next.js on Vercel with the Workflow SDK, and when to reach for Queues orDeploy Laravel on Vercel with Docker — Build a Laravel application with FrankenPHP and Docker, then deploy it to Vercel with production configuration, externalMigrate a Next.js app from Webflow Cloud to Vercel — Move your Next.js app from Webflow Cloud to Vercel: remove the OpenNext Cloudflare adapter, drop the base path, map storMigrate a TanStack Start app from Cloudflare to Vercel — Move your TanStack Start app off Cloudflare Workers and onto Vercel Functions, where Fluid compute scales it automaticalMigrate a TanStack Start app from Netlify to Vercel — Move your TanStack Start app off Netlify and onto Vercel Functions, where Fluid compute scales it automatically. Swap toMigrate an Astro app from Webflow Cloud to Vercel — Move your Astro app from Webflow Cloud to Vercel: swap the @astrojs/cloudflare adapter for @astrojs/vercel, drop the basHow to migrate from Cloudflare Workflows to Vercel Workflows — Migrate from Cloudflare Workflows to Vercel Workflows by mapping WorkflowEntrypoint, step.do, and waitForEvent to workflNext.js on Vercel vs Cloudflare — Compare running Next.js on Vercel Functions with Fluid compute against Cloudflare Workers with the OpenNext Cloudflare aNext.js on Vercel vs Webflow Cloud — Compare running Next.js on Vercel Functions with Fluid compute against Webflow Cloud on Cloudflare Workers. Learn how NeNext.js on Vercel vs Netlify — Compare running Next.js on Vercel Functions with Fluid compute against Netlify Functions and the OpenNext adapter. LearnBuild an agent with OpenAI Agents API on Vercel — Build and deploy an agent with OpenAI Agents API, Vercel Functions, Queues, and Sandbox for isolated code execution.Publish and subscribe to realtime data on Vercel — Learn how to publish and subscribe to realtime data on Vercel with WebSockets, SSE, Redis, and Queues, and when a manageHow to send emails from an application on Vercel — Send email from Vercel Functions over an HTTP API instead of SMTP. Match the right Next.js pattern to your trigger and fHow to ship an Elysia app on Vercel — Deploy a Elysia app to Vercel with zero configuration. Learn how to ship from a template, the Vercel CLI, or Git, and coHow to ship an Express app on Vercel — Deploy an Express app to Vercel with zero configuration. Configure response streaming, middleware, cron jobs, the Bun ruHow to ship a FastAPI app on Vercel — Deploy a FastAPI app to Vercel with zero configuration. Learn how the Python runtime, Vercel Functions, streaming, middlHow to ship a Flask app on Vercel — Deploy a Flask app to Vercel with zero configuration. Learn how to ship from a template, the Vercel CLI, or Git, and conHow to ship an H3 app on Vercel — Deploy an H3 app to Vercel with zero configuration. Learn to configure streaming, middleware, cron jobs, the Bun runtimeHow to ship a Hono app on Vercel — Deploy a Hono app to Vercel with zero configuration. Learn how to ship from a template, the Vercel CLI, or Git, and confHow to ship a Nitro app on Vercel — Deploy a Nitro app to Vercel with zero configuration. Learn how to ship from a template, the Vercel CLI, or Git, and conDeploy Symfony on Vercel with Docker — Build a Symfony application with FrankenPHP and Docker, then deploy it to Vercel with production configuration, externalTanStack Start on Vercel vs Cloudflare — Compare running TanStack Start on Vercel Functions with Fluid compute against Cloudflare Workers. Learn how the runtimesTanStack Start on Vercel vs Netlify — Compare running TanStack Start on Vercel Functions with Fluid compute against Netlify Functions. Learn how the compute mVercel vs Webflow Cloud — Compare Vercel and Webflow Cloud for deploying Next.js and Astro apps, including runtime, framework support, storage, prFrom vercel-webA new programming model for durable executionAgentic InfrastructureThe best workflow engine is a programming languageFrom workflowFramework Integrations — Build a custom framework integration using the Workflow SDK compiler and runtime.From vercel-docsRun background tasks with Celery on Vercel — Deploy Celery on Vercel. Learn how Celery workers use Vercel Queues and Vercel Functions to run background tasks withoutDeploy Dramatiq workers on Vercel — Deploy Dramatiq workers on Vercel. Learn how Dramatiq actors use Vercel Queues and Vercel Functions to process backgrounGlossary — Learn about the terms and concepts used in Vercel's products and documentation.Observability Insights — List of available data sources that you can view and monitor with Observability on Vercel.Projects overview — A project is where you deploy and operate frontend apps, APIs, backends, containers, and agent workloads on Vercel.Vercel Queues: JS SDK Reference — Publish and consume messages with the Vercel Queues SDK for JavaScript and TypeScript.OpenAI Agents API — Connect OpenAI Agents API sessions to Vercel Sandbox for isolated code execution and persistent workspace files.Vercel Workflows — Build agents and applications that retry failed steps, wait for external events, and resume across crashes and deploymen


Quickstart