Code Monkey home page Code Monkey logo

Comments (2)

smcvb avatar smcvb commented on July 27, 2024

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.

smcvb avatar smcvb commented on July 27, 2024

Closing this issue due to prolonged inactivity. Feel free to keep commenting on this.

from axonbank.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.