From my experience, definitely go with the second approach. Try to spend a lot of time initially defining the events with domain experts. Designing events that map well to the domain in the first place is the hardest, but also the most important criteria for success with event sourcing. Usually that means very specific event types. A simplified example from my career: an event EquityPurchased { Portfolio, Symbol, Quantity, Price } can be used when the customer says: "Our portfolio should calculate cost FIFO rather than average". Very specific events are also easier to version, because often something in the past version has been implicit. In the example the customer may say: "we are going to purchase some equities on the Oslo Stock Exchange, we didn't really care about currency and currency rates since we only bought US stocks before." So now we can make a new verison of EquityPurchased { Portfolio, Symbol, Quantity, Price, Currency = "USD", ExchRate = 1 }
No comments yet.