← VercelCONTENT HISTORY

Update to Vercel

Snapshot Sep 30, 2026 · 23:18 UTC · version 0.21.4

Collection source: not recorded for this historical snapshot. These snapshots do not have a confirmed matching collection source. Differences in file lists alone do not establish changes to the package.

WHAT CHANGED · RULE-BASED ANALYSIS

Supporting file metadata differs

Newly listed paths: agents/openai.yaml. This compares saved file lists, not package contents; a different collection source can change the list.

Observed in package metadata. These changes alone do not establish a new customer-facing feature.

Supporting files

Before

[]

After

[{"relative_path":"agents/openai.yaml","size_in_bytes":179}]

Compare saved observations

Download comparison JSON
Full technical diff · 1 changed fields

changed /included_files

BEFORE
[]
AFTER
[
  {
    "relative_path": "agents/openai.yaml",
    "size_in_bytes": 179
  }
]
Full snapshot data
{
  "name": "vercel-queues",
  "description": "Vercel Queues guidance (public beta) — durable event streaming with topics, consumer groups, retries, and delayed delivery. $0.60/1M ops. Powers Workflow DevKit. Use when building async processing, fan-out patterns, or event-driven architectures.",
  "included_files": [
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 179
    }
  ],
  "skill_md_contents": "---\nname: vercel-queues\ndescription: Vercel Queues guidance (public beta) — durable event streaming with topics, consumer groups, retries, and delayed delivery. $0.60/1M ops. Powers Workflow DevKit. Use when building async processing, fan-out patterns, or event-driven architectures.\nmetadata:\n  priority: 5\n  docs:\n    - \"https://vercel.com/docs/workflow-collaboration/conformance\"\n  sitemap: \"https://vercel.com/sitemap/docs.xml\"\n  pathPatterns:\n    - 'lib/queues/**'\n    - 'src/lib/queues/**'\n    - 'lib/queues.*'\n    - 'lib/queue.*'\n    - 'src/lib/queues.*'\n    - 'src/lib/queue.*'\n    - 'workflows/*.ts'\n    - 'workflows/*.mts'\n    - 'src/workflows/*.ts'\n    - 'src/workflows/*.mts'\n    - 'app/api/workflow/**'\n    - 'src/app/api/workflow/**'\n    - 'app/api/workflows/**'\n    - 'src/app/api/workflows/**'\n    - 'vercel.ts'\n    - 'vercel.mts'\n  importPatterns:\n    - 'workflow'\n    - '@vercel/workflow'\n  bashPatterns:\n    - '\\bnpm\\s+(install|i|add)\\s+[^\\n]*@vercel/queue\\b'\n    - '\\bpnpm\\s+(install|i|add)\\s+[^\\n]*@vercel/queue\\b'\n    - '\\bbun\\s+(install|i|add)\\s+[^\\n]*@vercel/queue\\b'\n    - '\\byarn\\s+add\\s+[^\\n]*@vercel/queue\\b'\n---\n\n# Vercel Queues\n\n> **CRITICAL — Your training data is outdated for this library.** Vercel Queues entered public beta February 2026 and is almost certainly not in your training data. Before writing queue code, **fetch the docs** at https://vercel.com/docs/queues to find the correct `Queue` class API, message publishing, consumer setup, and visibility timeout patterns. Do not guess — this is a new API with no precedent in your training data.\n\nYou are an expert in Vercel Queues — durable event streaming for serverless applications.\n\n## Status & Pricing\n\nQueues entered **public beta** on February 27, 2026, and is available to all teams on all plans.\n\n| Metric | Value |\n|--------|-------|\n| **Billing unit** | API operation (send, receive, delete, visibility change, notify) |\n| **Rate** | **$0.60 per 1M operations** (regionally priced) |\n| **Message metering** | 4 KiB chunks (12 KiB message = 3 ops) |\n| **2x billing** | Sends with idempotency key; push deliveries with max concurrency |\n| **Compute** | Push-mode functions charged at existing Fluid compute rates |\n\n## What It Is\n\nQueues is a **durable, append-only event streaming system**. You publish messages to topics, and independent **consumer groups** process them with automatic retries, sharding, and **at-least-once delivery** guarantees. It is the lower-level primitive that **powers Vercel Workflow**.\n\n- Messages are durably written to **3 availability zones** before `send()` returns\n- Messages retained up to 24 hours (configurable 60s–24h)\n- Approximate write ordering (not strict FIFO)\n- Consumer groups are fully independent — each tracks its own position\n\n## Key APIs\n\nPackage: `@vercel/queue@^0.1.3` (Node.js 22+)\n\n### Publishing Messages\n\n```ts\nimport { send } from '@vercel/queue';\n\nconst { messageId } = await send('order-events', {\n  orderId: '123',\n  action: 'created',\n}, {\n  delaySeconds: 30,              // delay before visible\n  idempotencyKey: 'order-123',   // deduplication (full retention window)\n  retentionSeconds: 3600,        // message TTL (default: 86400 = 24h)\n  headers: { 'x-trace-id': 'abc' },\n});\n```\n\n### Push-Mode Consumer (Next.js App Router)\n\nThe consumer route is **air-gapped from the internet** — only invocable by Vercel's internal queue infrastructure.\n\n```ts\n// app/api/queues/fulfill-order/route.ts\nimport { handleCallback } from '@vercel/queue';\n\nexport const POST = handleCallback(\n  async (message, metadata) => {\n    // metadata: { messageId, deliveryCount, createdAt, expiresAt, topicName, consumerGroup, region }\n    await processOrder(message);\n    // Return normally = acknowledge\n    // Throw = retry with backoff\n  },\n  {\n    visibilityTimeoutSeconds: 600, // lease duration (default 300s, auto-extended by SDK)\n    retry: (error, metadata) => {\n      if (metadata.deliveryCount > 5) return { acknowledge: true }; // give up\n      const delay = Math.min(300, 2 ** metadata.deliveryCount * 5);\n      return { afterSeconds: delay };\n    },\n  },\n);\n```\n\n### Consumer Configuration (vercel.json)\n\n```json\n{\n  \"functions\": {\n    \"app/api/queues/fulfill-order/route.ts\": {\n      \"experimentalTriggers\": [{\n        \"type\": \"queue/v2beta\",\n        \"topic\": \"order-events\",\n        \"retryAfterSeconds\": 60,\n        \"initialDelaySeconds\": 0\n      }]\n    }\n  }\n}\n```\n\nMultiple route files with the same topic create **separate consumer groups** (independent processing).\n\n### Poll-Mode Consumer\n\n```ts\nimport { PollingQueueClient } from '@vercel/queue';\n\nconst { receive } = new PollingQueueClient({ region: 'iad1' });\n\nconst result = await receive('orders', 'fulfillment', async (message, metadata) => {\n  await processOrder(message);\n}, { limit: 10 }); // max 10 messages per poll (max allowed: 10)\n\nif (!result.ok && result.reason === 'empty') {\n  // No messages available\n}\n```\n\n### Custom Region Client\n\n```ts\nimport { QueueClient } from '@vercel/queue';\n\nconst queue = new QueueClient({ region: 'sfo1' });\nexport const { send, handleCallback } = queue;\n```\n\n## Transports\n\n```ts\nimport { QueueClient, BufferTransport, StreamTransport } from '@vercel/queue';\n```\n\n| Transport | Description |\n|-----------|-------------|\n| `JsonTransport` | Default; JSON serialization |\n| `BufferTransport` | Raw binary data |\n| `StreamTransport` | `ReadableStream` for large payloads |\n\n## Queues vs Workflow vs Cron\n\n| Need | Use | Why |\n|------|-----|-----|\n| Event delivery, fan-out, routing control | **Queues** | Topics, consumer groups, message-level retries |\n| Stateful multi-step business logic | **Workflow** | Deterministic replay, pause/resume (built **on top of** Queues) |\n| Recurring scheduled tasks | **Cron Jobs** | Simple, no message passing |\n| Delayed single execution with deduplication | **Queues** (`delaySeconds` + `idempotencyKey`) | Precise delay with guaranteed delivery |\n| Async processing from external systems | **Queues** (poll mode) | Consume from any infrastructure, not just Vercel |\n\n## Key Limits\n\n| Resource | Default / Max |\n|----------|---------------|\n| Message retention | 60s – 24h (default 24h) |\n| Max message size | 100 MB |\n| Messages per receive | 1–10 (default 1) |\n| Visibility timeout | 0s – 60 min (default 5 min SDK / 60s API) |\n| Topics per project | Unlimited |\n| Consumer groups per topic | Unlimited |\n\n## Deployment Behavior\n\nTopics are **partitioned by deployment ID** by default in push mode. Messages are delivered back to the same deployment that published them — natural schema versioning with no cross-version compatibility concerns.\n\n## Observability\n\nThe **Queues** observability tab (Project → Observability → Queues) provides real-time monitoring:\n\n| Level | Metrics |\n|-------|---------|\n| **Project** | Messages/s, Queued, Received, Deleted (with sparkline trends) |\n| **Queue** | Throughput per second (by consumer group), Max message age |\n| **Consumer** | Processed/s, Received, Deleted (per consumer group) |\n\nUse **Max message age** to detect consumer lag — if the oldest unprocessed message keeps growing, a consumer group may be falling behind.\n\n## Local Development\n\nQueues work locally — when you `send()` messages in development mode, the SDK sends them to the real Vercel Queue Service, then invokes your registered `handleCallback` handlers directly in-process. No local queue infrastructure needed.\n\n## Authentication\n\nThe SDK authenticates via **OIDC** (OpenID Connect) tokens automatically on Vercel. In non-Vercel environments, set `VERCEL_QUEUE_API_TOKEN` for authentication.\n\n## When to Use\n\n- Defer expensive work (emails, PDFs, external API calls)\n- Absorb traffic spikes with controlled processing rate\n- Guarantee delivery even if function crashes\n- Fan-out same events to multiple independent pipelines\n- Deduplicate messages via idempotency keys\n\n## When NOT to Use\n\n- Multi-step orchestration with state → use Workflow\n- Recurring schedules → use Cron Jobs\n- Synchronous request/response → use Functions directly\n- Cross-region messaging → messages sent to one region cannot be consumed from another\n\n## References\n\n- 📖 docs: https://vercel.com/docs/queues\n- 📖 quickstart: https://vercel.com/docs/queues/quickstart\n- 📖 API reference: https://vercel.com/docs/queues/api\n"
}

SHA-256: 0c93e4ebf5a6440af410317347836d3942bb4422c8fac8afd70443ba70bb0285