QUEUES
Durable queues for background work
Enqueue jobs, let workers pull at their pace, and rely on retries and webhooks — without running your own job infrastructure.
import { QPub } from "@qpub/sdk";
const rest = new QPub.Rest({ apiKey: "…" });
await rest.queues.enqueue("emails", { … });Pull-based workers
Producers stay fast. Workers scale independently, acknowledge completed jobs, and retry failures on your terms.
Enqueue once, process at scale
Queues buffer work between services — email sends, media processing, billing runs, and integration fan-out that should not block HTTP requests.
- Named queues per workload or tenant
- Workers pull when capacity is available
- Acknowledgements and retries built into the model
Queues vs Channels
Use both in the same app: Channels for what users see in realtime; Queues for work that can finish seconds or minutes later.
Channels
- Live fan-out to subscribers
- Best for UI and device sync
- Delivery while clients are connected
Queues
- Durable jobs with pull workers
- Retries and completion webhooks
- Decouple producers from processing time
Frequently asked questions
- Do queues replace channels?
- No. Channels deliver live updates to subscribers. Queues store jobs for asynchronous processing.
- How do workers receive jobs?
- Workers pull from the queue when ready, process the payload, then acknowledge success or allow retry on failure.
- Can I enqueue from a serverless function?
- Yes. REST enqueue fits short-lived handlers that should not wait for processing to finish.
Start processing background jobs
First Job in Minutes