DEV Community

KARAN RAJ SURYA
KARAN RAJ SURYA

Posted on

Stop adding Redis just for simple job queues: I built catqueue, a PostgreSQL-native job queue for Node & TypeScript

I built *CatQueue *-- a lightweight, Redis-free, PostgreSQL-native job queue for Node.js and TypeScript. If you already run Postgres, you don't need to manage a separate Redis cluster just to run background jobs.

Key Highlights:

Atomic & Multi-Worker Safe: Powered by SELECT FOR UPDATE SKIP LOCKED (zero race conditions).

Fast Enqueuing: UNNEST bulk inserts cut enqueue latency by ~85%.

Built-In DAGs: Native job dependency graphs with cycle detection via Kahn's algorithm.

Crash Proof: 30s visibility timeouts for worker crashes, exponential retries, DLQ replay, and auto-purging cron jobs.

Performance: Matched with BullMQ on DB write-heavy workloads without the extra Redis overhead.

Check it out:

NPM: npmjs.com/package/catqueue

GitHub: github.com/karanrajsurya/CatQueue_npm_package

Would love your feedback on the locking mechanics, or drop a star ⭐ if you find it useful!

Top comments (0)