Guide
VQueue setup
VQueue is a built-in HTTP webhook queue on every Layerbase Valkey database. It is compatible with the @upstash/qstash client, so the publishing and verification code you may already use keeps working. No separate signup, no separate billing.
1. Create a Valkey database
On the Create Database page, pick Valkey. VQueue is included on every Valkey database, including the free tier, with nothing extra to turn on.
2. Copy the VQueue environment variables
From the database's connection panel, copy these into your environment:
VQUEUE_URL=... # your VQueue endpoint
VQUEUE_TOKEN=... # publish/auth token
VQUEUE_CURRENT_SIGNING_KEY=... # verify incoming deliveries3. Publish a job
Point the qstash Client at your VQueue endpoint:
pnpm add @upstash/qstashimport { Client } from '@upstash/qstash'
const client = new Client({
baseUrl: process.env.VQUEUE_URL!,
token: process.env.VQUEUE_TOKEN!,
})
await client.publishJSON({
url: 'https://your-app.com/api/jobs',
body: { hello: 'world' },
})4. Verify signed deliveries
Every delivery is signed. Verify it in your handler with the Receiver and your current signing key so nobody can spoof your webhook endpoint:
import { Receiver } from '@upstash/qstash'
const receiver = new Receiver({
currentSigningKey: process.env.VQUEUE_CURRENT_SIGNING_KEY!,
})
const isValid = await receiver.verify({
signature: req.headers['upstash-signature'],
body: rawRequestBody,
})
if (!isValid) throw new Error('Invalid signature')What v1 covers
v1 handles immediate fire-and-forget webhook delivery with signing, retries, and a dead-letter queue. Scheduled delays are on the roadmap.