Giter VIP home page Giter VIP logo

Comments (3)

gautema avatar gautema commented on May 26, 2024

from cqrslite.

GuiguiMtl avatar GuiguiMtl commented on May 26, 2024

Thanks for your answer.

The session is not cleared because after committing the first aggregate, the event is broadcasted to the system. It is handle by the event handler which creates and save the process manager. At this point the session keeps track of the aggregates that was saved previously and the process manager.

That's because even if it is asynchronous everything is done in this given order :
->Commit
-> Flush changes to aggregate
-> Save event to EventStore
-> Publish Events
-> Event Handler Handles Event
-> Launch Process Manager
-> Commit changes made on the process manager
-> Concurrency exception because we are still in the save of the first commit. As we did not reach the clear aggregates statement of the first Commit, we try to save a version of an Aggregate which is the previous version.

Creating a new session in the handler would probably fix the issue but I feel like it would break the idea of Session you were trying to bring with it, no ?

from cqrslite.

gautema avatar gautema commented on May 26, 2024

Sorry the late reply. I don't think you should use the same session. Hopefully you have fixed this by now.

from cqrslite.

Related Issues (20)

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.