I'm planning out the events that my application will be creating, but am running into problems with my design. I believe I'm not applying the event-sourcing concepts correctly.
Take the bank account example. My application receives a command to deposit cash, accepts it, and then creates the event
CashDeposited. Based on the business logic, the higher account balance triggers the interest rate to be increased, so I create the event
Now if I record both of these events to my event store, upon restart, both events will be replayed. But because the
CashDeposited event triggers the
InterestRateChanged event, won't the
InterestRateChanged be replayed twice: once from the event store and once as a result of
CashDeposited being replayed?