Hi,
we are currently struggling with our way of properly cleaning up the business case of deleting a tenant in our architecture. As it is now, deleting a tenant creates a cascade of commands and events throughout our services, which are separately handling specific aggregates.
In our conception, we wanted to do it straightforward: DeleteTenantCommand -> TenantDeletedEvent, which is picked up by Bounded Contexts related to a tenant. But when we pick up a TenantDeletedEvent in the EventListener of a related Organisation service and send the corresponding DeleteOrganisationByTenantDeletionCommand to result in a OrganisationDeletedByTenantDeletionEvent, we experience gaps in our globalIndex. Since this is just the very top of the cascade, we are worried about gaps that would halt our TrackingProcessors, when thousands of Asset Aggregates are deleted depending on the Organisation and so on.
Deleting a single Organisation in this context does not create a gap, nor does deleting a Tenant which only has one Organisation, it just appears when there are more than one Organisation.
Is there anything wrong with the approach? Should the process be wrapped in a Saga, and if so, how would that work?
Sincerely,
Lars Karschen