Hi Axon users
My team is in a situation where we have the same service running twice, but for 2 different locations.
Both services receive all events from each other. The events have a ‘tenant id’ in their payload which contains the location. Based on this tenant id, each event listener knows to ONLY listen for it’s own location.
The problem we face involves the starting of Sagas. We want to be able to start a Saga only if the starting event has the tenant id for its own location. We know you can conditionally close a Saga, but the conditionally starting of a Saga doesn’t seem to be possible.
A possible solution would be to start the Saga, then check if the tenant equals the location of the service, and close the Saga if the condition is not fulfilled. However this doesn’t seem to be very clean to us.
Does anybody have an idea to do this properly?
Thanks in advance.