Outbox Messenger

Reliable Outbox Pattern Worker for Go.
Periodically fetches messages from your DB and reliably publishes them to AWS SNS or NATS JetStream.

$ outbox-messenger outbox polling -c config.yaml
Get Started
Copied!

Why Outbox Messenger?

In distributed systems, atomically updating the database and sending messages to a broker is challenging.
Outbox Messenger simplifies the **Outbox Pattern**, providing guaranteed ordering and high reliability.

Strict Ordering

Records with the same aggregate_id are sorted and published in order. Stops on failure to preserve order.

Retry & Backoff

Implements exponential backoff logic. Automatically retries during temporary failures while reducing load.

Multi-Backend

Supports AWS SNS and NATS JetStream. Automatically selects the publisher based on aggregate_type (ARN/RN).

Architecture Explorer

Click on the components below to explore the message flow.

App
Outbox Table
Outbox Worker
Polling & Publishing
SNS / NATS

Architecture Flow

Outbox Messenger mediates between your app and message brokers. It uses a polling model to avoid complex distributed transactions.

Click a component on the diagram to learn more.

Setup Guide

schema.sql

Integration Steps

Observability

Production Ready

Outbox Messenger comes with built-in logging and tracing capabilities ready for production.

Logging

Supported Handlers:

Text / JSON Rollbar Sentry Datadog

Tracing

OpenTelemetry Support:

Otel Collector

Configurable Service Name & Environment.

Publishing Throughput (Simulated)

Last 60s Now

Operational Notes

Required Columns

Your application must create a table with the following columns.

Column Type Updater
aggregate_type VARCHAR (ARN/RN) App
aggregate_id VARCHAR (Group ID) App
payload JSON App
retry_at / sent_at DATETIME Worker