upstash-qstash-js

oleh upstash

Bekerja dengan SDK TypeScript/JavaScript QStash untuk pengiriman pesan serverless, penjadwalan. Gunakan saat mempublikasikan pesan ke endpoint HTTP, membuat jadwal,…

npx skills add https://github.com/upstash/skills --skill upstash-qstash-js

QStash JavaScript SDK

QStash is an HTTP-based messaging and scheduling solution for serverless and edge runtimes. This skill helps you use the QStash JS SDK effectively.

When to use this skill

Use this skill when:

  • Publishing HTTP messages to endpoints or URL groups
  • Creating scheduled or delayed message delivery
  • Managing FIFO queues with configurable parallelism
  • Verifying incoming webhook signatures from QStash
  • Implementing callbacks, DLQ handling, or message deduplication

Quick Start

Installing the SDK

npm install @upstash/qstash

Basic Publishing

import { Client } from "@upstash/qstash";

const client = new Client({
  token: process.env.QSTASH_TOKEN!,
});

const result = await client.publishJSON({
  url: "https://my-api.example.com/webhook",
  body: { event: "user.created", userId: "123" },
});

Core Concepts

For fundamental QStash operations, see:

For verifying incoming messages:

  • Receiver Verification - Core signature verification with the Receiver class
  • Platform-Specific Verifiers:
    • Next.js - App Router, Pages Router, and Edge Runtime

For advanced features:

Platform Support

QStash JS SDK works across various platforms:

  • Next.js (App Router and Pages Router)
  • Cloudflare Workers
  • Deno
  • Node.js (v18+)
  • Vercel Edge Runtime
  • SvelteKit, Nuxt, SolidJS, and other frameworks

Note on Workflow SDK: For building complex durable workflows that chain multiple QStash messages together, consider using the separate QStash Workflow SDK (@upstash/workflow). The Workflow SDK empowers you to orchestrate multi-step processes with automatic state management, retries, and fault tolerance. This Skills file focuses on the core QStash messaging SDK.

Best Practices

  • Always verify incoming QStash messages using the Receiver class
  • Use environment variables for tokens and signing keys
  • Set appropriate retry counts and timeouts for your use case
  • Use queues for ordered processing with controlled parallelism
  • Implement DLQ handling for failed message recovery

Lebih banyak skill dari upstash

context7-docs
upstash
Ambil dokumentasi dan contoh kode terbaru untuk pustaka, kerangka kerja, SDK, alat CLI, atau layanan cloud apa pun. Gunakan saat pengguna bertanya tentang hal spesifik…
official
context7-mcp
upstash
Keterampilan ini harus digunakan ketika pengguna bertanya tentang pustaka, kerangka kerja, referensi API, atau membutuhkan contoh kode. Aktif untuk pertanyaan pengaturan, kode…
official
ctx7-cli
upstash
Gunakan CLI ctx7 untuk mengambil dokumentasi perpustakaan, mengelola keterampilan pengkodean AI, dan mengonfigurasi Context7 MCP. Aktifkan saat pengguna menyebut "ctx7" atau "context7",…
official
docs
upstash
Mengambil dan menanyakan dokumentasi terkini serta contoh kode dari Context7 untuk pustaka atau kerangka kerja pemrograman apa pun. Gunakan saat menulis kode yang bergantung pada…
official
documentation-lookup
upstash
Ambil dokumentasi perpustakaan terkini dan contoh kode, bukan hanya mengandalkan data pelatihan. Menyelesaikan nama perpustakaan ke ID dokumentasi Context7, lalu mencari informasi pengaturan, konfigurasi, dan referensi API. Mendukung kerangka kerja dan perpustakaan utama: React, Vue, Svelte, Next.js, Express, Prisma, Supabase, Tailwind, dan lainnya. Aktif secara otomatis untuk pertanyaan pengaturan, permintaan pembuatan kode, dan pertanyaan spesifik kerangka kerja. Mengembalikan dokumentasi yang sadar versi dan kode resmi...
official
find-docs
upstash
Ambil dokumentasi terkini dan contoh kode untuk pustaka apa pun menggunakan CLI Context7.
official
redis-js
upstash
Bekerja dengan Upstash Redis JavaScript/TypeScript SDK untuk operasi Redis serverless. Gunakan untuk caching, penyimpanan sesi, pembatasan laju, papan peringkat, teks lengkap…
official
upstash-search-js
upstash
Titik masuk untuk keterampilan dokumentasi yang mencakup panduan memulai cepat Upstash Search, konsep inti, dan penggunaan SDK TypeScript. Gunakan saat pengguna bertanya cara memulai,…
official