Offline

PgQueuer: Drop the Broker, Keep the Queue

Track:
Web Development, Web APIs, Front-End Integration
Type:
Talk
Level:
intermediate
Duration:
30 minutes
View in the schedule

Abstract

Learn how to turn your existing PostgreSQL database into a job queue - no extra infrastructure required. You'll leave this talk with a understanding of the specific pg-SQL patterns that make it work, and practical guidance on whether this approach fits your project.

I'll walk through the design and internals of PgQueuer, covering:

  • The problem: Why adding a dedicated message broker to your stack introduces operational complexity that many teams don't need - and the hidden costs of running, monitoring, and debugging a separate service.
  • The solution: Safe concurrent job claiming across multiple workers without collisions, sub-second job dispatch without constant polling, and all of it backed by your existing database.
  • Architecture and API design: How PgQueuer is structured, from the database schema to the decorator-based Python API, and the design decisions behind it.
  • Performance: Benchmarks showing 14k+ jobs/second throughput with asyncpg, and how durability policies (volatile, balanced, durable) let you trade safety for speed depending on your workload.
  • Tradeoffs and limits: What workloads PostgreSQL handles well as a job queue, what it doesn't, and how to know when your project needs something different.

All code shown uses PgQueuer (MIT-licensed, tested across PostgreSQL 13-18 and Python 3.10-3.14).