Tuesday, May 10, 2022

Pattern: Transaction log tailing


How to publish messages/events into the outbox in the database to the message broker?


Tail the database transaction log and publish each message/event inserted into the outbox to the message broker.

The mechanism for trailing the transaction log depends on the database:

  • MySQL binlog
  • Postgres WAL
  • AWS DynamoDB table streams


  • Eventuate Tram framework implements transaction log tailing.

Resulting context

This pattern has the following benefits:

  • No 2PC
  • Guaranteed to be accurate

This pattern has the following drawbacks:

  • Relatively obscure although becoming increasing common
  • Requires database-specific solutions
  • Tricky to avoid duplicate publishing

You may also like

Kubernetes Microservices
Python AI/ML
Spring Framework Spring Boot
Core Java Java Coding Question
Maven AWS