Introducing PortQueue
PortQueue is a database-backed job queue for Node.js — no broker required. If your app already runs a relational database, you already have everything you need for a reliable queue. PortQueue treats that database as the single source of truth and works across PostgreSQL, Oracle, PGLite, and SQLite from one API.
Why another queue?
Most Node queues assume Redis. That's a great fit for some teams and an unwanted extra
moving part for many others — a second datastore to run, secure, back up, and reason
about. Meanwhile, PostgreSQL with SKIP LOCKED and LISTEN/NOTIFY is more than enough for
a robust queue, as pg-boss showed. PortQueue takes that insight and makes it
multi-driver, strictly typed, and transactional.
What you get
- One API across every engine. Swap the driver import; your app code is unchanged.
- One process or many. One
pqobject produces and consumes, so running everything on a single server is a complete setup — and splitting producers from consumers is there when you want it. - Transactional enqueue. A job exists only if your business transaction commits — the dual-write bug, gone.
- Operational maturity. Retries with backoff, rate limiting, backpressure, cron with timezones, a dashboard, and a CLI — no third-party service.
A first taste
import { PortQueue } from '@portqueue/core';
import { PostgresqlDriver } from '@portqueue/core/drivers/postgresql';
const pq = new PortQueue({ driver: new PostgresqlDriver({ connectionString: process.env.DATABASE_URL }) });
await pq.init();
// Create the queue and provide a jobs handler.
pq.createQueue({
name: 'emails',
limiter: { concurrency: 10 },
handler: async (job) => { await send(job.data); },
});
// Add a job to the queue.
await pq.addJob({ queue: 'emails', data: { to: 'a@b.com' } });
Free and open source. Commercial use permitted. No license fee, no obligations.
Head to Getting Started to try it.