.Hi guys,
I’m trying to understand how to design a specific cross-domain notification using EventStore (I am guessing using projections).
Here is a simplified example of what I am trying to model
-
imagine that there are 2 domains - an HR domain and a Payroll Domain, containing aggregates
-
I would imagine that both of the domains are modelled with their own aggregate streams
-
Sally gets married, and so the HR Manager changes her name from “Sally Smith” to “Sally Jones” - an EmployeeNameChanged event is captured into the aggregate stream in the HR domain
-
I would like to subscribe to the EmployeeNameChanged Event in the Payroll Domain, so that I can update Sally’s name in the Payroll Domain
How would I go about doing this? I imagine that I would want a “linked event” to be projected into the aggregate stream in the aggregate stream in the Payroll domain…otherwise the event/notification may appear out of order when rebuilding current state (i.e.: if a separate stream were used). -
Is this good practice/design (the payroll domain would obviously become dependent on the HR domain’s event schema)?
-
are projections the best mechanism for doing this?
-
what alternatives exist for modelling event orchestrations between dependent event-sourced domains?
[RB]