It is not possible to use the same events between two aggregates. #272
Replies: 2 comments
-
|
This is expected behaviour, as events may trigger aggregate that have published them. |
Beta Was this translation helpful? Give feedback.
-
|
@dgafka My original idea was to use the same event for more than one stream. I have a business case that justifies this behavior. Looking for a similar solution I found that EventStoreDB gives the possibility to emit events by linking. However, the current implementation of I would like to keep this issue open for a while and try to come up with a proper solution. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
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.
Beta Was this translation helpful? Give feedback.
All reactions