Skip to content

Introduction

Open Outbox Relay is an open-source, high-performance implementation of the Transactional Outbox Pattern. It bridges the gap between your primary database and your message broker (Kafka, NATS, etc.) to ensure that every business event is delivered—without exception.


In distributed systems, updating a database and sending a message simultaneously is risky. If the message broker is down, you lose data. If the database fails after the message is sent, you have “ghost” events.

Open Outbox solves this by treating event publishing as a database transaction.

At-Least-Once Delivery

Events are persisted in your DB first. The Relay ensures they reach your broker even if the network fluctuates.

Database Agnostic

Designed for PostgreSQL, with a pluggable architecture for other storage engines and message brokers.

High Performance

Written in Go, utilizing batch processing and non-blocking I/O to handle thousands of events per second.

Self-Healing

Built-in lease management allows multiple Relay instances to coordinate and recover from worker crashes.


  1. Produce: Your application saves a business change and an event record into the openoutbox_events table within a single transaction.
  2. Poll: The Relay polls the database for pending events using a highly optimized “skip locked” query.
  3. Publish: The Relay pushes the events to your configured broker (Kafka, NATS, etc.).
  4. Acknowledge: Once the broker confirms receipt, the Relay marks the event as delivered.

Get Started

Follow the Quick Start to run the demo environment in under 5 minutes.