pg-messaging

Installation
SKILL.md

Postgres Messaging Primitives

Pure-SQL pub/sub and task queue implementations using PostgreSQL. No external message brokers required. All logic lives in SQL — clients connect directly, or through a thin HTTP/gRPC layer.

Core Principles

  • SQL is the API: All messaging logic is implemented as SQL queries, not application code
  • Atomic by default: Writes reserve offsets and insert messages in a single transaction
  • Consumer groups: Log-based pub/sub with per-group offset tracking, inspired by Kafka
  • Lock-free queues: SELECT FOR UPDATE SKIP LOCKED for contention-free job claiming
  • Flexible access: Direct Postgres connections, HTTP wrapper, or auto-generated API (PostgREST)
Related skills
Installs
8
First Seen
Apr 2, 2026