muoncore / newton

Extend Muon into the world of Spring. Implement Muon apis, especially around events to provide DDD patterns natively in Spring Boot
http://muoncore.io
GNU Lesser General Public License v3.0
12 stars 5 forks source link

Start using the event provenance fields in the muon schema #34

Open daviddawson opened 7 years ago

daviddawson commented 7 years ago

During a saga (or maybe other processing), generating of new events should include a link to the event that "caused" the event to be emitted.

This is done by setting the "caused-by" field in the muon event schema.

Inferring causality may be difficult in many cases, but a generalised form should be made for sagas.

When running a sage responding to an event, the commands should be marked with the caused-by event id, and the events created during its execution stamped with that ID.