AxonFramework
AxonFramework copied to clipboard
Reconsider `AggregateLifecycle#markDeleted`
Although AggregateLifecycle#markDeleted served its purpose, we've seen people enter unexpected scenarios when using this functionality, as the aggregate could no longer be reached.
Furthermore, adding a simple boolean deleted to a model is, in most cases, sufficient.
Combining this with the @MessageHandlerInterceptor inside the model makes it so you can recreate the entire behavior of AggregateLifecycle#markDeleted without using "framework magic."