Skip to content
All projects

Open source2023

tinyqueue

A tiny, typed job queue for Node.js with retries, priorities and zero configuration.

A monitor showing a code editor on a white desk

Overview

tinyqueue is an open source job queue I wrote after setting up the same background worker boilerplate for the fifth time. It does one thing well: run jobs reliably, with retries and priorities, in about 4 KB of code.

Why I built it

The popular queue libraries are powerful, but most small apps need maybe a tenth of what they offer. I wanted something you can read end to end in an afternoon and still trust in production.

What it does

  • Typed jobs, so the payload you enqueue is exactly the payload your worker receives.
  • Retries with exponential backoff and a dead letter queue for jobs that keep failing.
  • Graceful shutdown that finishes in-flight jobs before your process exits.

Community

The project has grown to 4,200 stars, 90,000 weekly downloads and 38 contributors. Maintaining it has taught me as much about writing documentation and reviewing pull requests kindly as it has about queues.

Contact

Have a project in mind? Let's talk.

I'm taking on a small number of freelance projects and I'm open to senior full-time roles. Send me a note and I'll reply within two working days.

What is this about?

Your details are only used to reply to your message.