Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Retrieval and Domain Logic Missing #2

Open
Brandon2255p opened this issue Aug 17, 2018 · 1 comment
Open

Event Retrieval and Domain Logic Missing #2

Brandon2255p opened this issue Aug 17, 2018 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@Brandon2255p
Copy link

Firstly, thanks for the example and the medium article. I am busy trying to make my own CQRS ES system with go. I have done work on a CQRS ES system in C# but have decided to try learn go and see if it works better.

I see that you do have the function to retrieve events for an aggregate but it is not implemented (not a problem of course)

My main issue is knowing where and how to implement the domain rules. From my experience (which may be wrong), if a command comes in then all the events related to that aggregate ID need to be retrieved and replayed to create an aggregate state. The command can then execute to see if it passes the domain logic. Like to to stop a payment if a certain order has already had its payment executed.

Once the domain logic has passed then the event can be stored and published.

Hope I am on the right track and have not been misled. I would like to know how you would do this. Or if you have a more full example for me.

@shijuvar shijuvar added the help wanted Extra attention is needed label Sep 3, 2018
@StarpTech
Copy link

I really appreciate this example but it has nothing to do with Event Sourcing. You only demonstrate CQRS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants