You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: