Quickstart
Add a queue in Queuedash, attach the SDK to it, and see its jobs in the dashboard.
The SDK listens to your queue's events, reads each job it hears about, and sends the jobs to Queuedash in batches: every 100 ms, or as soon as 50 are waiting.
Prereqs
- Node.js 18+ (the SDK uses the built-in
fetch) - BullMQ 5+, Bull 4+, or Bee-Queue 1+
- A Queuedash account
Install the SDK
pnpm add @queuedash/sdk
# npm install @queuedash/sdk
# yarn add @queuedash/sdkAdd the queue in Queuedash
Queuedash only keeps jobs for queues it knows about. Jobs sent for any other queue name are dropped.
- Open your project. In the environment the jobs belong to, go to Queues → Add
- Enter the queue's name exactly as your code spells it, and pick its type
- Leave Headless mode (no Redis) on and click Create. Headless means Queuedash doesn't connect to your Redis; the queue's jobs arrive through the SDK.
A queue's name and type can't be changed later.
Create an API key
- In the same environment, go to API Keys → Add
- Name the key and click Create
- Copy it (it's shown once) and store it in your secrets manager
QUEUEDASH_API_KEY=sk_live_...A key belongs to one environment, and the jobs it sends land in that environment.
Attach your queue
BullMQ example:
import { Queue } from "bullmq";
import { Queuedash } from "@queuedash/sdk";
const qd = new Queuedash({
apiKey: process.env.QUEUEDASH_API_KEY,
});
const myQueue = new Queue("my-queue", {
connection: { host: "localhost", port: 6379 },
});
qd.attach(myQueue);attach recognizes BullMQ, Bull, and Bee-Queue queues by their shape, and throws Unknown queue type for anything else.
Sending from outside production
The SDK sends to https://sync.queuedash.com only when NODE_ENV is production. Otherwise it sends to http://localhost:4002. To send jobs to Queuedash from a process where NODE_ENV isn't production, set baseUrl:
const qd = new Queuedash({
apiKey: process.env.QUEUEDASH_API_KEY,
baseUrl: "https://sync.queuedash.com",
});Supported queues
| Queue | Version | Events the SDK listens to |
|---|---|---|
| BullMQ | 5 or later | added, waiting, waiting-children, delayed, active, progress, completed, failed, retries-exhausted, stalled, deduplicated, removed |
| Bull | 4 or later | active, progress, removed, global:completed, global:failed |
| Bee-Queue | 1 or later | succeeded, failed, retrying |
GroupMQ isn't supported; see GroupMQ.
Next steps
- Configure the SDK for batching, retries, and timeouts
- Set up alerts for failure rates, backlogs, and stuck jobs
- Invite your team