Transactional outbox relay for PostgreSQL
A lightweight low-latency outbox event relay powered by PostgreSQL logical replication. Bridging the gap between naive polling and full-blown CDC solutions like Debezium.
How it works
Your application writes to the outbox table. outboxd handles everything else.
Your app inserts a row into the outbox table inside a transaction alongside your business data.
outboxd picks up the INSERT via a PostgreSQL logical replication slot in real time.
Your handler receives the message and delivers it - to Kafka, RabbitMQ, HTTP, or anywhere.
The row is deleted from the outbox table and the WAL position is acknowledged automatically.
Why outboxd
No framework to learn, no interfaces to implement, no configuration files. Just a Go function.
Powered by PostgreSQL logical replication. Events are picked up as soon as they're committed - no polling intervals.
WAL position is acknowledged only after successful handler execution. If the handler fails or the relay crashes, the message will be redelivered.
No JVM, no Kafka Connect, no Debezium. Just PostgreSQL with wal_level=logical and your Go application.
Configurable max retries with a drop callback. Failed messages don't block the pipeline.
PostgreSQL replication slots are exclusive. Run multiple relay instances for high availability - failover is automatic.
Exponential backoff on connection loss. The relay reconnects automatically without losing messages or duplicating deliveries.
Usage
Define a handler, create a relay, start it. That's the entire API.
Prerequisites
PostgreSQL must have wal_level=logical enabled. Create a publication for your outbox table.
Try it
Starts PostgreSQL, RabbitMQ, a producer, a consumer, and two competing relay instances.
outboxd is free, open-source, and maintained in spare time. If it saves you time, consider sponsoring to help keep it going.