No, everything will be fine. A domain event is generated when the state of an aggregate changes. If nothing has changed, there is no domain event.
You can also use events outside the domain, but they will not be part of the domain and, obviously, are not part of the flow of events.
In your scenario, if the event is not generated as an effect of the cumulative change, why should it be contained in any aggregate? And technically speaking, in what stream of events will you add this event if it does not belong to anything? Will you add this event to all involved ToDos? It makes no sense.
Iโm not sure that the cleanup is part of your domain, but if it is, it means that all completed todos are โdeletedโ, since each involved unit already has a ToDoDeleted event in its collection. AllCompletedTodosPurged is just an event that is useful for updating the reading model, but that is. It should not affect the domain model.
source share