Consider following scenario: The Cycle aggregate has the certificate issuing logic. Certificate is an aggregate with functionalities independent of Cycle, such as suspension.
It is not possible to use the same events between aggregates when the Certificate aggregate factory method is an EventHandler returning the event originally returned by Cycle. Both aggregates are saved correctly, but after saving the Certificate, the published CertificateIssued event causes a loop and triggers the factory method again for the same parameters.
Proper PR with test case will be introduced.
Consider following scenario: The
Cycleaggregate has the certificate issuing logic.Certificateis an aggregate with functionalities independent ofCycle, such as suspension.It is not possible to use the same events between aggregates when the
Certificateaggregate factory method is anEventHandlerreturning the event originally returned byCycle. Both aggregates are saved correctly, but after saving theCertificate, the publishedCertificateIssuedevent causes a loop and triggers the factory method again for the same parameters.Proper PR with test case will be introduced.