/queues
Vercel Queues guidance — durable topics with at-least-once delivery, independent consumer groups, retries, delays, and idempotency keys via @vercel/queue (JS) or vercel-queue (Python). Use when deferring background work, buffering traffic, fanning out events, or choosing between
Claude Code
$ npx -y skills add vercel/vercel-plugin --skill queues --agent claude-code
Codex
$ npx skills add vercel/vercel-plugin --skill queues -a codex -y
Cursor
$ npx skills add vercel/vercel-plugin --skill queues -a cursor -y
Gemini CLI
$ npx skills add vercel/vercel-plugin --skill queues -a gemini-cli -y
GitHub Copilot
$ npx skills add vercel/vercel-plugin --skill queues -a github-copilot -y
OpenCode
$ npx skills add vercel/vercel-plugin --skill queues -a opencode -y
Windsurf
$ npx skills add vercel/vercel-plugin --skill queues -a windsurf -y
SKILL.md
queues.SKILL.mdname: queues
description: Vercel Queues guidance — durable topics with at-least-once delivery, independent consumer groups, retries, delays, and idempotency keys via @vercel/queue (JS) or vercel-queue (Python). Use when deferring background work, buffering traffic, fanning out events, or choosing between Queues and Workflows.
summary: "Vercel Queues (beta) publishes JSON messages to durable topics with `send()` from `@vercel/queue`; consumers are Vercel Functions exported with `handleCallback()` and registered in vercel.json under `functions.<path>.experimentalTriggers` as `{ type: 'queue/v2beta', topic: '<name>' }`. Delivery is at-least-once with automatic retries; use Workflows instead for multi-step durable logic."
metadata:
priority: 6
docs:
- "https://vercel.com/docs/queues"
- "https://vercel.com/docs/queues/sdk"
sitemap: "https://vercel.com/sitemap.xml"
pathPatterns:
- 'app/api/queues/**'
- 'src/app/api/queues/**'
- 'pages/api/queues/**'
- 'lib/queue.*'
- 'src/lib/queue.*'
- 'lib/queues/**'
- 'src/lib/queues/**'
bashPatterns:
- '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/queue\b'
- '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/queue\b'
- '\bbun\s+(install|i|add)\s+[^\n]*@vercel/queue\b'
- '\byarn\s+add\s+[^\n]*@vercel/queue\b'
- '\b(pip|uv)\s+(install|add)\s+[^\n]*vercel-queue\b'
importPatterns:
- "@vercel/queue"
promptSignals:
phrases:
- "vercel queues"
- "@vercel/queue"
- "background job"
- "background jobs"
- "message queue"
- "job queue"
- "consumer group"
allOf:
- [vercel, queues]
- [queue, topic]
- [queue, consumer]
- [queue, buffer]
- [fan, out]
anyOf:
- "queue"
- "topic"
- "retry"
- "consumer"
- "buffer"
- "background"
noneOf:
- "build queue"
- "deployment queue"
- "queued deployment"
- "deployments stuck"
- "queues up deployments"
- "queue up deployments"
- "queues my deployments"
- "queues our deployments"
- "queues your deployments"
- "queues the deployments"
- "queues deployments"
- "queues builds"
- "queues my builds"
minScore: 6
retrieval:
aliases:
- queues
- message queue
- background jobs
- event streaming
- pub sub
intents:
- defer work to a queue
- process background jobs
- fan out events to consumers
- retry failed jobs
- buffer traffic spikes
entities:
- Vercel Queues
- "@vercel/queue"
- topic
- consumer group
- handleCallback
- experimentalTriggers
chainTo:
-
pattern: '"use workflow"|"use step"|from\s+[''"]workflow[''"]'
targetSkill: workflow
message: 'Workflow SDK code alongside Queues — Workflows is built on Queues and adds durable steps, sleep, and hooks. Loading Workflow guidance.'
-
pattern: 'from\s+[''"](bullmq|bull|bee-queue|agenda)[''"]|@aws-sdk/client-sqs'
targetSkill: queues
message: 'Third-party job queue detected — Vercel Queues provides durable topics with retries and fan-out without running a broker. Loading Queues guidance.'
skipIfFileContains: '@vercel/queue'Vercel Queues
You are an expert in Vercel Queues, the durable message topics that power background work and agent events on Vercel.
What It Is
Vercel Queues (public beta) gives you durable, append-only topics. Producers publish JSON messages, and every subscribed consumer group receives every message with at-least-once delivery and automatic retries. New consumer groups can join later and replay non-expired history. Queues is the primitive under Vercel Workflows; use Queues directly when you need control over publishing, consumption, and routing.
- **Topic**: a named durable log of messages, created on first publish
- **Consumer group**: an independent subscriber that receives every message on a topic
- **Delivery**: at-least-once; handlers must be idempotent
- **Retention**: 24 hours by default, up to 7 days; delivery can be delayed up to the retention period
- **Modes**: push (Vercel invokes your function) or poll (your own workers pull messages from any environment)
Choose Queues or Workflows
| Need | Use | Why | |------|-----|-----| | Fire-and-forget background job, fan-out, buffering | **Queues** | Direct publish/consume, independent consumer groups | | Multi-step logic with sleep, hooks, or human approval | **Workflows** (`⤳ skill: workflow`) | Durable steps and replay built on top of Queues | | Scheduled invocation on a cron or once at a set time | Vercel Schedules (`⤳ skill: vercel-schedules`); a schedule can publish to a queue topic | Time-based trigger, not message-based; beta, replaces legacy Cron Jobs |
Quickstart (Next.js App Router)
Install the SDK:
npm install @vercel/queue
Publish from any route, Server Action, or function:
// app/api/orders/route.ts
import { send } from '@vercel/queue';
export async function POST(request: Request) {
const body = await request.json();
const { messageId } = await send('orders', { orderId: body.orderId, action: 'process' });
return Response.json({ messageId });
}Consume with a push-mode handler. Messages are acknowledged when the handler returns and retried when it throws:
// app/api/queues/process-order/route.ts
import { handleCallback } from '@vercel/queue';
export const POST = handleCallback(async (message, metadata) => {
await processOrder(message);
console.log('processed', metadata.messageId, 'delivery', metadata.deliveryCount);
});Register the consumer in `vercel.json` (or `vercel.ts`) so Vercel routes the topic to that function:
{
"functions": {
"app/api/queues/process-order/route.ts": {
"experimentalTriggers": [{ "type": "queue/v2beta", "topic": "orders" }]
}
}
}Run `vercel link` and `vercel env pull` before local development so the
Read more
name: queues
description: Vercel Queues guidance — durable topics with at-least-once delivery, independent consumer groups, retries, delays, and idempotency keys via @vercel/queue (JS) or vercel-queue (Python). Use when deferring background work, buffering traffic, fanning out events, or choosing between Queues and Workflows.
summary: "Vercel Queues (beta) publishes JSON messages to durable topics with `send()` from `@vercel/queue`; consumers are Vercel Functions exported with `handleCallback()` and registered in vercel.json under `functions.<path>.experimentalTriggers` as `{ type: 'queue/v2beta', topic: '<name>' }`. Delivery is at-least-once with automatic retries; use Workflows instead for multi-step durable logic."
metadata:
priority: 6
docs:
- "https://vercel.com/docs/queues"
- "https://vercel.com/docs/queues/sdk"
sitemap: "https://vercel.com/sitemap.xml"
pathPatterns:
- 'app/api/queues/**'
- 'src/app/api/queues/**'
- 'pages/api/queues/**'
- 'lib/queue.*'
- 'src/lib/queue.*'
- 'lib/queues/**'
- 'src/lib/queues/**'
bashPatterns:
- '\bnpm\s+(install|i|add)\s+[^\n]*@vercel/queue\b'
- '\bpnpm\s+(install|i|add)\s+[^\n]*@vercel/queue\b'
- '\bbun\s+(install|i|add)\s+[^\n]*@vercel/queue\b'
- '\byarn\s+add\s+[^\n]*@vercel/queue\b'
- '\b(pip|uv)\s+(install|add)\s+[^\n]*vercel-queue\b'
importPatterns:
- "@vercel/queue"
promptSignals:
phrases:
- "vercel queues"
- "@vercel/queue"
- "background job"
- "background jobs"
- "message queue"
- "job queue"
- "consumer group"
allOf:
- [vercel, queues]
- [queue, topic]
- [queue, consumer]
- [queue, buffer]
- [fan, out]
anyOf:
- "queue"
- "topic"
- "retry"
- "consumer"
- "buffer"
- "background"
noneOf:
- "build queue"
- "deployment queue"
- "queued deployment"
- "deployments stuck"
- "queues up deployments"
- "queue up deployments"
- "queues my deployments"
- "queues our deployments"
- "queues your deployments"
- "queues the deployments"
- "queues deployments"
- "queues builds"
- "queues my builds"
minScore: 6
retrieval:
aliases:
- queues
- message queue
- background jobs
- event streaming
- pub sub
intents:
- defer work to a queue
- process background jobs
- fan out events to consumers
- retry failed jobs
- buffer traffic spikes
entities:
- Vercel Queues
- "@vercel/queue"
- topic
- consumer group
- handleCallback
- experimentalTriggers
chainTo:
-
pattern: '"use workflow"|"use step"|from\s+[''"]workflow[''"]'
targetSkill: workflow
message: 'Workflow SDK code alongside Queues — Workflows is built on Queues and adds durable steps, sleep, and hooks. Loading Workflow guidance.'
-
pattern: 'from\s+[''"](bullmq|bull|bee-queue|agenda)[''"]|@aws-sdk/client-sqs'
targetSkill: queues
message: 'Third-party job queue detected — Vercel Queues provides durable topics with retries and fan-out without running a broker. Loading Queues guidance.'
skipIfFileContains: '@vercel/queue'Vercel Queues
You are an expert in Vercel Queues, the durable message topics that power background work and agent events on Vercel.
What It Is
Vercel Queues (public beta) gives you durable, append-only topics. Producers publish JSON messages, and every subscribed consumer group receives every message with at-least-once delivery and automatic retries. New consumer groups can join later and replay non-expired history. Queues is the primitive under Vercel Workflows; use Queues directly when you need control over publishing, consumption, and routing.
- **Topic**: a named durable log of messages, created on first publish
- **Consumer group**: an independent subscriber that receives every message on a topic
- **Delivery**: at-least-once; handlers must be idempotent
- **Retention**: 24 hours by default, up to 7 days; delivery can be delayed up to the retention period
- **Modes**: push (Vercel invokes your function) or poll (your own workers pull messages from any environment)
Choose Queues or Workflows
| Need | Use | Why | |------|-----|-----| | Fire-and-forget background job, fan-out, buffering | **Queues** | Direct publish/consume, independent consumer groups | | Multi-step logic with sleep, hooks, or human approval | **Workflows** (`⤳ skill: workflow`) | Durable steps and replay built on top of Queues | | Scheduled invocation on a cron or once at a set time | Vercel Schedules (`⤳ skill: vercel-schedules`); a schedule can publish to a queue topic | Time-based trigger, not message-based; beta, replaces legacy Cron Jobs |
Quickstart (Next.js App Router)
Install the SDK:
npm install @vercel/queue
Publish from any route, Server Action, or function:
// app/api/orders/route.ts
import { send } from '@vercel/queue';
export async function POST(request: Request) {
const body = await request.json();
const { messageId } = await send('orders', { orderId: body.orderId, action: 'process' });
return Response.json({ messageId });
}Consume with a push-mode handler. Messages are acknowledged when the handler returns and retried when it throws:
// app/api/queues/process-order/route.ts
import { handleCallback } from '@vercel/queue';
export const POST = handleCallback(async (message, metadata) => {
await processOrder(message);
console.log('processed', metadata.messageId, 'delivery', metadata.deliveryCount);
});Register the consumer in `vercel.json` (or `vercel.ts`) so Vercel routes the topic to that function:
{
"functions": {
"app/api/queues/process-order/route.ts": {
"experimentalTriggers": [{ "type": "queue/v2beta", "topic": "orders" }]
}
}
}Run `vercel link` and `vercel env pull` before local development so the
Comprehensive Vercel ecosystem plugin — relational knowledge graph, skills for every major product, specialized agents, and Vercel conventions. Turns any AI agent into a Vercel expert.
Other skills on vercel.
More skills from other plugins.
container
Use when running, building, or managing Linux containers on macOS, or when a task involves Docker, docker compose, Lima, Colima,…
frontend-forge-fe-oper…
Operate FrontendExtension (FE) resources in frontend-forge: create, update, rebuild, inspect package artifacts, download…
agent-advisor
Entry point for AI-agent work on AWS: pick a runtime, plan a migration for existing workloads, and build an executable POC — one…
agents-sdk
Build, debug, or review Cloudflare Agents SDK applications using the agents package.
Questions about queues.
- Which coding agents can use queues?
- queues installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.

