we are looking into a problem that one command needs to be handled by multiple aggregates, is it possible to have it using RoutingStrategy, or even another good practice?
our use case:
- we calculate the salary for employees based on multiple criteria: worked hours - vacations - bonus…etc, and we have a field of the aggregate which is the hourly wage. so we designed our aggregates such that we have one aggregate per employee per month. and when this hourly wage gets changed, we need to fire one command that handled by all salary aggregates to update the state, salary…etc.
- the problem is that we don’t have a list of all salary aggregates ids per driver so that we can loop on them and fire the command, so we was thinking to have some sort of routing strategy that takes one command and forward it to multiple salary aggregates, is this possible?