Get Started Free
course: Microservices 101

The Transactional Outbox Pattern

6 min
Wade Waldron

Wade Waldron

Staff Software Practice Lead

The Transactional Outbox Pattern


The transactional outbox pattern leverages database transactions to update a microservice's state and an outbox table. Events in the outbox will be sent to an external messaging platform such as Apache Kafka. This technique is used to overcome the dual-write problem which occurs when you have to write data to two separate systems such as a database and Apache Kafka. The database transactions can be used to ensure atomic writes between the two tables. From there, a separate process can consume the outbox and update the external system as required. This process can be written manually, or we can leverage tools such as Change Data Capture (CDC) or Kafka connectors.


  • What is the dual-write problem?
  • What is the transactional outbox pattern?
  • How can we emit events to Apache Kafka?
  • What tools can be used to process an outbox?
  • What delivery guarantees does the outbox pattern provide?
  • What are the problems with the outbox pattern?


Use the promo code MICRO101 to get $25 of free Confluent Cloud usage

Be the first to get updates and new content

We will only share developer content and updates, including notifications when new content is added. We will never send you sales emails. 🙂 By subscribing, you understand we will process your personal information in accordance with our Privacy Statement.