chaokunyang / microservices-event-sourcing

Microservices Event Sourcing 是一个微服务架构的在线购物网站,使用Spring Boot、Spring Cloud、Spring Reactor、OAuth2、CQRS 构建,实现了基于Event Sourcing的最终一致性,提供了构建端到端微服务的最佳实践

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

关于事务问题

dudemonkey opened this issue · comments

代码貌似不够全面,有个老外分享的代码:https://github.com/kbastani/spring-cloud-event-sourcing-example ,对应文章:http://www.kennybastani.com/2016/04/event-sourcing-microservices-spring-cloud.html
各个服务做的均是查询居多,对于事务的控制这块如何实现我研究不透彻,烦请各位git友指点一二。例如:下单时锁库存实现、支付时扣减库存实现等,在event-sourcing模型中如何实现事务控制保证数据一致性?难道是每个服务都要写一个fallback方法自己实现回滚逻辑?涉及到事务的服务都添加event事件?有没有q群交流下,谢谢!