Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 2.06 KB

Transaction_Log_Tailing.md

File metadata and controls

46 lines (37 loc) · 2.06 KB

Transaction Log Tailing

Motivation

  • How to update the database and publish a message (event) atomically (either all success, or all fail).
  • Cannot use distributed transaction pattens to solve this problem.
    • Many modern message brokers don’t support distributed transactions.

Solution

Concepts

  • Publish messages by tailing the database’s transaction log.
  • A transaction log miner reads the transaction log and publish each change as a message to the message broker.

Implementation

  • Requires database specific solutions.
  • It can be difficult to reverse engineer the high‑level business events from the low‑level updates recorded in the transaction log.

Pros & Cons

Pros

  • The atomicity of updating the database and publishing a message (event) is guaranteed.

Cons

  • Requires database specific solutions.

Consideration

Topic Consideration Possible Solution Options

When To Use

References