Vorsteh Queue is a robust, ORM-agnostic queue engine designed for PostgreSQL 12 and above. It simplifies the handling of background jobs, scheduled tasks, and recurring processes, with features like type-safe job payloads, multiple adapters, priority queues, and reliable UTC timezone management.
Vorsteh Queue is a powerful and ORM-agnostic queue engine designed specifically for PostgreSQL 12 and above. This tool simplifies the management of background jobs, scheduled tasks, and recurring processes, enabling developers to focus on building applications instead of handling complex job processing logic.
The project is organized into a clear directory structure, with dedicated packages for core functionality and various adapters.
To utilize Vorsteh Queue, ensure your environment meets the following requirements:
Here's a basic example of how to implement Vorsteh Queue with the Drizzle ORM:
import { drizzle } from "drizzle-orm/node-postgres";
import { Pool } from "pg";
import { PostgresQueueAdapter } from "@vorsteh-queue/adapter-drizzle";
import { Queue } from "@vorsteh-queue/core";
const pool = new Pool({ connectionString: "postgresql://..." });
const db = drizzle(pool);
const queue = new Queue(new PostgresQueueAdapter(db), { name: "my-queue" });
queue.register("send-email", async (job) => {
// Email sending logic
});
await queue.add("send-email", { to: "user@example.com", subject: "Welcome!" });
queue.start();
Additional examples are available in the examples directory that demonstrate advanced usage and features.
No comments yet.
Sign in to be the first to comment.