A transaction log miner reads committed database log entries and publishes corresponding changes as messages to a broker. In a transaction outbox design, it converts log entries for inserted outbox messages into broker messages. section 8.3.8 section 8.4
Consider log tailing when polling the database is too costly or unsuitable:
- Polling is simple and can work at low scale, but frequent queries can be expensive; querying business entities may also be inefficient or unsupported in some NoSQL databases. section 8.3.8
- Log tailing is a more sophisticated and performant alternative for publishing changes from an RDBMS outbox or messages appended to NoSQL records. section 8.3.8
Implementations
Debezium publishes database changes to Apache Kafka. DynamoDB Streams exposes a time-ordered sequence of table-item changes that an application can read and publish as events. section 8.3.8
Figure 8.18 A service publishes messages inserted into the OUTBOX table by mining the database’s transaction log.
Diagram of a service publishing outbox messages by mining the database transaction log. section 8.3.8
