A powerful, ORM-agnostic queue engine for PostgreSQL 12+. Handle background jobs, scheduled tasks, and recurring processes with ease.
import { MemoryQueueAdapter, Queue } from "@vorsteh-queue/core"
interface TEmailPayload {
to: string
subject: string
}
interface TEmailResult {
sent: boolean
}
const adapter = new MemoryQueueAdapter()
const queue = new Queue(adapter, { name: "email-queue" })
queue.register<TEmailPayload, TEmailResult>("send-email", async ({ payload }) => {
// Send email logic here
return { sent: true }
})
await queue.add("send-email", { to: "user@example.com", subject: "Welcome!" })
queue.start()
Built for developers who need reliability, flexibility, and excellent developer experience
Intuitive API design with TypeScript support, comprehensive documentation, and helpful error messages that make development a breeze.
Works with Drizzle ORM, Kysely and Prisma ORM for PostgreSQL. Adapter pattern allows easy integration with your existing database setup.
Battle-tested with built-in retry logic, job cleanup, progress tracking, and graceful shutdown handling for mission-critical applications.
Comprehensive event system for monitoring job lifecycle. Listen to job progress, completion, failures, and queue state changes.
Reliable timezone handling with UTC-first approach. All timestamps stored as UTC with timezone conversion at job creation time.
Full TypeScript support with generic job payloads and results. Compile-time type checking ensures your jobs are properly typed and safe.
Everything you need to handle background processing in your applications
Execute tasks once with optional delays and priority levels.
Set up repeating tasks with flexible intervals and cron expressions.
Schedule jobs for specific dates and times with UTC-first timezone conversion for reliable execution.
Configurable retry strategies with exponential backoff and maximum attempt limits for failed jobs.
Delay job execution with precise timing control.
Process high-priority jobs first with numeric priority system (lower number = higher priority).
Store and access job results returned by handlers. Results are automatically persisted and available through events.
Real-time job progress updates with percentage tracking. Monitor long-running tasks with built-in progress reporting.
Automatic cleanup of completed and failed jobs with configurable retention policies to manage database size.
Configurable job timeouts to prevent long-running jobs from blocking the queue. Set per-job or global timeout limits.
Get real-time queue statistics including pending, processing, completed, failed, and delayed job counts.
Clean job processing termination that waits for active jobs to complete before stopping the queue.
The name "Vorsteh Queue" is a tribute to our beloved German Spaniel. This breed is closely related to the Münsterländer, a type of pointing dog, known in German as a "Vorstehhund". Just as a pointing dog steadfastly indicates its target, Vorsteh Queue aims to reliably point your application towards efficient and robust background job processing.
The inspiration for naming a tech project after a dog comes from the delightful story of Bruno, the API client. It's a nod to the personal touch and passion that drives open-source development, much like the loyalty and dedication of our canine companions.
Vorsteh Queue is completely free and open source. Built by developers, for developers. No hidden costs, no vendor lock-in, no limitations. Use it in your personal projects, startups, or enterprise applications.