How to implement a microservice Event Driven architecture with Spring Cloud Stream Kafka and Database per service

前端 未结 2 2075
野性不改
野性不改 2020-12-29 15:42

I am trying to implement an event driven architecture to handle distributed transactions. Each service has its own database and uses Kafka to send messages to inform other m

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-29 15:58

    I think the proper way for implementing Event Sourcing is by having Kafka be filled directly from events pushed by a plugin that reads from the RDBMS binlog e.g using Confluent BottledWater (https://www.confluent.io/blog/bottled-water-real-time-integration-of-postgresql-and-kafka/) or more active Debezium (http://debezium.io/). Then consuming Microservices can listen to those events, consume them and act on their respective databases being eventually consistent with the RDBMS database.

    Have a look here to my full answer for a guideline: https://stackoverflow.com/a/43607887/986160

提交回复
热议问题