Go · Rust · TypeScript · SQL
Message queues
on PostgreSQL
PostgreMQ provides worker queues and publish/subscribe with messages and delivery state stored in PostgreSQL. It installs as a SQL schema, with no PostgreSQL extension or separate queue server required.
Open source · MIT license
Shared work
Independent delivery
Queues and delivery
Worker queues
Multiple workers share a Durable queue. Each worker claims messages to process; acknowledgements record completion. The queue keeps its backlog and accepts new messages while workers are offline.
Publish/subscribe
Give each subscriber its own queue on a topic for independent delivery, acknowledgements, and retries. Durable queues retain an offline backlog; Exclusive queues expire after a configured window without renewal.
Outbox pattern
Commit application writes and message publication in one transaction when they use the same PostgreSQL database. Both commit or neither does, without a separate outbox table or relay.
FIFO queues
A group key preserves delivery order within that group in each queue. Other groups can be processed concurrently. Ordering works with both Durable and Exclusive queues.
At-least-once delivery
Unacknowledged messages become available again after their visibility timeout, subject to queue lifetime and retry limits. Consumers must handle redelivery without repeating application effects.
Dead-letter queues
Set a delivery-attempt limit per queue to move exhausted messages to its dead-letter queue. Inspect failures, fix the cause, and requeue messages for another attempt. Retries are unlimited by default.
Delayed messages set the earliest delivery time. Handler and stream consumers support batching, automatic visibility extension, and graceful shutdown.
Client APIs
Use Go, Rust, or TypeScript clients, or call the SQL functions directly. The guides cover publishing, consuming, and queue configuration, with examples in each language.
Developer and administration guides →API reference →Running PostgreMQ
Message durability depends on your PostgreSQL deployment. Schedule queue maintenance and plan database capacity, monitoring, and backups alongside your application workload.
PostgreMQ is not an AMQP endpoint or a retained event log with rewindable consumer offsets.
Installation →Deployment planning →Compatibility →