Event Sourcing: Events that trigger others & rebuilding state
I'm struggling to get my head around what should happen when rebuilding the model by replaying events from the EventStore, in particular when events may trigger other events to happen. For example, a user who has made 10 purchases should be promoted to a preferred customer and receive an email offering them certain promotions. We clearly don't want the email to be sent every time we rebuild the model for that user, but how do we stop this from happening when we replay our 10th PurchaseMadeEvent ? Events chaining can be very tricky and easily run out of control, so I'd avoid it as much as