wangboliang / cqrs-axon-demo Goto Github PK
View Code? Open in Web Editor NEWBase on axon. cqrs. saga.
Base on axon. cqrs. saga.
我在代码中看到只是发送event到了mq中,但是并没有解决事务问题
commandBus 发送了 command 后,后面就是异步执行的了,在发送event的过程中如果宕机或者网络中断,那么evnet就存在没有发送成功的可能,这时候业务怎么处理呢?
event我也没看到重发,或者利用持久化的机制来进行存储,以便下次恢复的时候重发.
对于最终一致性我还有一个比较大的疑惑,
例如 我集群中存在 3台服务器,使用event来达到一致性
有一个需要检查余额才能进行的业务,某用户余额现有1000元,第一次调用转出900,发送了转出900的事件,3台服务器其中的两台都已经消费了事件,另外一台消费较慢(服务器配置不好)
现在,用户又点击一次转出900,刚好命中消费较慢的那一台,那么 这台服务器怎么判断该用户是否有足够的钱转出呢? 或者说有什么办法可以解决这样的问题呢?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.