Skip to content

Transactional outbox pattern with Node.js and Debezium

Notifications You must be signed in to change notification settings

nebarf/nodejs-outbox

Repository files navigation

Transactional outbox pattern

Implementation of transactional outbox pattern, a method that allows to atomically perform a local business transaction and send domain events to a message broker. The example leverages

The example includes a order service acting as events producer. It store events in an outbox table and performs regular business operations as part of the same database transaction. Debezium monitors the outbox table streaming new entries to RabbitMQ. The shipment service acts as message consumer reading events from the broker.

High level architecture mirrors the schema below.

Architecture Overview

Credits

  • The implementation is heavily inspired by the official Debezium outbox example.
  • Related post on Debezium blog.