This section contains practical examples that demonstrate various features and use cases of Vorsteh Queue. Each example is a complete, runnable project that you can use as a starting point for your own implementation.
Getting Started #
Each example includes:
- Complete source code
- Setup instructions
- Environment configuration
- Database schema
- Running instructions
Choose an example that matches your use case and follow the setup instructions to get started quickly.
Batch Processing
Demonstrates batch job processing. Shows how to register batch handlers, dispatch jobs in batches, and monitor batch events for robust, event-driven workflows.
Drizzle with custom schema & table
Demonstrates Vorsteh Queue with Drizzle ORM and postgres.js driver. Uses custom schema and table names for queue jobs.
Drizzle with node-postgres
Demonstrates Vorsteh Queue with Drizzle ORM and node-postgres driver. Shows basic job processing, priorities, and delayed scheduling.
Drizzle with PGlite
Demonstrates Vorsteh Queue with Drizzle ORM and PGlite (embedded PostgreSQL). Perfect for testing and development with zero database setup required.
Drizzle with postgres.js
Demonstrates Vorsteh Queue with Drizzle ORM and postgres.js driver. Shows job priorities, recurring jobs, and event handling.
Event System
Demonstrates comprehensive event monitoring and queue management with job lifecycle events, statistics tracking, and queue control.
kysely with custom schema & table
Demonstrates Vorsteh Queue with kysely and postgres.js driver. Uses custom schema and table names for queue jobs.
kysely with postgres.js
Demonstrates Vorsteh Queue with kysely and postgres.js driver. Shows job priorities, recurring jobs, and event handling.
PM2 Worker
Demonstrates running multiple specialized queue workers with PM2 process manager for production deployment. Shows clustering, monitoring, and process management.
Prisma with prisma-client
Demonstrates Vorsteh Queue with Prisma ORM using the `prisma-client` ( without rust binaries ) provider that generates TypeScript files directly.
Prisma with prisma-client-js
Demonstrates Vorsteh Queue with Prisma ORM using the traditional `prisma-client-js` provider for backward compatibility.
Prisma with custom schema & table
Demonstrates Vorsteh Queue with Prisma ORM using the PostgreSQL driver. Uses custom schema and table names for queue jobs.
Progress Tracking
Demonstrates real-time job progress tracking with dataset processing and file upload simulations. Shows progress updates and event monitoring.
Result Storage
Demonstrates job result storage and retrieval. Shows how job handlers return typed results that are automatically stored and accessible through events.