6 ms·
You certainly can drive activities from events in event sourcing applications. Having built many like this. You don't have to, but you can. Just make sure serv
by UK-AL 7y ago
You certainly can drive activities from events in event sourcing applications. Having built many like this. You don't have to, but you can.
Just make sure services that perform actions based on events, and the services that rebuild current state based on events are different. So you replay the state building without the activities being performed.
- hinkley 7y agoAlso it's good if you go very very conservative on having actions generate other events. Since event systems are frequently meant to scale up, and tend to process events in the order of receipt, they will tolerate ('hide' might be more accurate) a percentage of all events occurring in an infinite loop before anyone even thinks to notice. Discovery phase on this sort of regression can be embarrassing, to say the least. Due to delegation and composition it's easy for this to sneak up on you. And always, always, attach some sort of origin ID (eg, correlation ID) that follows all generated events through the system. Because trying to come up with repro cases will be hard enough without having to divine where the problem comes into the system.