i have a question if i am missing a concept regarding the subscription of events of a specific aggregate instance.
my situation is as follows:
I have a User (Aggregate) that can be associated with one or more Issues (each is another aggregate). Now when something happens in a specific user (resulting in an event), i want the associated Issues to subscribe to this event (but only of that User Aggregate Instance). Is there a way to accomplish this without sagas?
I see the following possibilities with axon.
- Use a saga. the saga is started when the user is created and is associated with that specific aggregateid. when an issue is associated with the User the saga keeps track of that issue. now when something of interest happens in the user, the saga can subscribe to that event and “forward” it via a command to the “registered” Issues. Here the saga keeps track of the issues. is there a limit on the number of sagas? should there be forever living sagas?
- The User also tracks the associated issues (this is what i try to avoid) and publishes them in the event. so an eventhandler or saga can transform commands to the Issues out of this information.
- I just publish the event and the event handler / saga searches (via a dedicated lookup model or maybe the read model) for associated Issues. It then sends commands to the identified Issues.
Is there another maybe easier possibility that i am missing?
Thanks and best regards
P.S.: i am using axon 3.4.2