Skip to main content

Namastack Outbox

Transactional Outbox for Spring Boot

From commit to delivery

Reliable events, without the dual-write gap

Keep business data and outgoing events consistent, then deliver them on your application's terms.

What is Namastack Outbox?

Namastack Outbox is an open-source library that makes reliable event publishing part of a Spring Boot application. It stores outgoing events alongside business data and processes them asynchronously after commit, providing at-least-once delivery without another infrastructure component. Use it for events, commands, notifications, or any work that must survive application and downstream failures.

Why a transactional outbox?

Database updates and broker publishes are separate operations; either can succeed while the other fails. Namastack closes that gap by saving the outbox record in the same local transaction as the business change. Background workers deliver committed records and retry failures. Delivery can repeat after a crash, so consumers should be idempotent. See the delivery guarantees.

Built for Spring Boot

Use Java or Kotlin with JPA, JDBC, or MongoDB starters. Publish through ready-made Kafka, RabbitMQ, and Amazon SNS integrations, or write a custom handler. Per-key ordering, partition-aware horizontal scaling, configurable retries, fallback handling, Micrometer metrics, and trace propagation cover the operational path from persistence to delivery. Explore persistence and messaging options.

Guaranteed Reliability

Never lose a message: All records are saved together with your business data, ensuring that no important information is lost - even in the event of failures.

Effortless Scalability

Grow with your business: The system automatically distributes work across multiple application instances, so you can handle more load without manual intervention.

Flexible Integration

Easily connect to your business processes: Use simple, type-safe handlers to process any kind of event, command, or notification, tailored to your needs.

Automatic Error Handling

Reduce operational risk: Built-in retry and fallback mechanisms ensure that temporary issues are handled automatically, and critical failures are managed gracefully.

Full Observability

Gain insights and traceability: Context propagation and built-in metrics provide end-to-end visibility, making it easy to monitor, audit, and troubleshoot your event flows.

Seamless Operations

Works with your existing infrastructure: Supports all major databases and integrates smoothly with Spring Boot, so you can adopt it without disrupting your current systems.

Spring Modulith Integration

Seamlessly integrate Namastack Outbox with Spring Modulith for outbox-backed event externalization. Get transactional guarantees, automatic retry handling, and production-ready reliability for your modular monolithic applications.

How It Works

Namastack Outbox for Spring Boot brings bulletproof reliability to your event-driven systems - combining transactional integrity with seamless message delivery.

When your application writes data, both the entity table and the outbox table are updated within a single ACID transaction. This guarantees that your domain state and outgoing events remain consistent - even if the system crashes mid-operation.

A background outbox scheduler polls the database for new records and hands them off to your custom outbox processor - a lightweight interface you implement to publish messages to your broker (e.g. Kafka, RabbitMQ, SNS).

Once messages are successfully delivered, they’re marked as processed.

This architecture ensures:

  • Zero message loss, even under failure
  • Strict per-aggregate ordering for deterministic processing
  • Horizontal scalability with hash-based partitioning
  • At-least-once delivery with safe retry policies and observability

With Namastack Outbox for Spring Boot, you get the reliability of database transactions - and the resilience of message-driven design.

Build confidently. Scale safely. Never lose an event again.

Outbox architecture diagramOutbox architecture diagram

Support the Project

Namastack Outbox started as a personal passion project — built because reliable event publishing is much harder than it looks. A lot of time goes into maintaining, improving, and documenting this library. If it saves you time or gives you confidence in your architecture, consider sponsoring to keep it going.