Synchronising transactions between database and Kafka producer

前端 未结 3 1692
执念已碎
执念已碎 2020-12-13 06:55

We have a micro-services architecture, with Kafka used as the communication mechanism between the services. Some of the services have their own databases. Say the user mak

3条回答
  •  遥遥无期
    2020-12-13 07:20

    All the approach described above are the best way to approach the problem and are well defined pattern. You can explore these in the links provided below.

    Pattern: Transactional outbox

    Publish an event or message as part of a database transaction by saving it in an OUTBOX in the database. http://microservices.io/patterns/data/transactional-outbox.html

    Pattern: Polling publisher

    Publish messages by polling the outbox in the database. http://microservices.io/patterns/data/polling-publisher.html

    Pattern: Transaction log tailing

    Publish changes made to the database by tailing the transaction log. http://microservices.io/patterns/data/transaction-log-tailing.html

提交回复
热议问题