Built-in web dashboard for monitoring and managing your background job queues. Inspired by Laravel Horizon, the Queue Dashboard provides real-time visibility into your job processing pipeline.
Monitor pending, failed, and processed job counts at a glance
View pending and failed jobs with full payload details
One-click retry for failed jobs directly from the dashboard
Quickly clear all jobs when needed for development or reset
Mount the Queue Dashboard in your application with just a few lines of code. The dashboard will be available at /canx-queue.
1import { createApp, queue, QueueController } from "canxjs";23const app = createApp({ port: 3000 });45// Mount the Queue Dashboard at /canx-queue6app.routes((router) => {7router.controller('/canx-queue', QueueController);8});910app.listen();
Dispatch background jobs to queues and process them asynchronously. Jobs can be immediate or delayed.
1import { queue } from "canxjs";23// Dispatch a job to the queue4await queue.dispatch("send-email", {5to: "user@example.com",6subject: "Welcome!",7body: "Thank you for signing up."8});910// Dispatch with delay (5 minutes)11await queue.schedule("send-reminder", { userId: 123 }, 300);1213// Process jobs14queue.define("send-email", async (data) => {15await sendEmail(data);16console.log(`Email sent to ${data.to}`);17});
Programmatically interact with the queue using the Queue API. Get statistics, manage failed jobs, and more.
1// Get queue statistics2const stats = await queue.getStats();3console.log(stats);4// { pending: 12, failed: 2, processed: 158 }56// Get failed jobs7const failedJobs = await queue.getFailed();89// Retry a specific job10await queue.retry(jobId);1112// Clear all jobs13await queue.clear();
| Method | Endpoint | Description |
|---|---|---|
GET | /canx-queue/api/stats | Get queue statistics |
GET | /canx-queue/api/jobs/failed | List failed jobs |
GET | /canx-queue/api/jobs/pending | List pending jobs |
POST | /canx-queue/api/jobs/retry/:id | Retry a failed job |
POST | /canx-queue/api/clear | Clear all jobs |
Default driver, perfect for development and testing. Jobs are stored in memory.
MemoryDriverProduction-ready driver with persistence. Requires Redis server.
RedisDriver