Comments (2)
So, it seems that your third action, 'Delete Account' wasn't handled correctly or not at all on the read side of the system.
You probably need to add an @EventHandler
function to the read side which handles the 'Delete Account' event you've created to update the read side.
And yes, in this example it seems like your doubling your work, as it's changing the Aggregate state and has to change the read side to reflect the change.
The read/query side is however not tied to reflect the aggregate.
You could add a Event Handling class (a class with @EventHandler
annotated functions) for all bank events to update a search client. Or an Event Handling class which by getting triggered by a 'Delete Account'-event knows it needs to notify the owner of the bank account by sending an email.
A multitude of use cases could be imagined where the query side does not directly reflect the aggregate state and that's when your not duplicating logic.|
I hope the above explanation helps somewhat. If not, I'd gladely elaborate more on it.
from axonbank.
Closing this issue due to prolonged inactivity. Feel free to keep commenting on this.
from axonbank.
Related Issues (16)
- Code compilation issues HOT 1
- Configure to use the JacksonSerializer HOT 6
- Error starting ApplicationContext HOT 2
- Sonarcloud test coverage HOT 2
- How to create a unique user? HOT 1
- [critical] Some commands are not executed - but tests are however all green HOT 1
- how transaction works HOT 6
- Distributed version not working at the moment HOT 2
- Local version not working with actual version. HOT 1
- Read-only repository? HOT 1
- Issue while compiling the application HOT 2
- Switch to axon 3.0 final release HOT 3
- Axon upgrade
- DestinationBankAccountNotFoundEvent not properly persisted when using JPA HOT 2
- Using Axon/CQRS-ES as full architecture HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from axonbank.