Allow publication completion to delete database entries instead of setting completion date #748
Labels
in: event publication registry
Event publication registry
type: enhancement
Major enhanvements, new features
Milestone
Currently, an event publication is marked as completed by updating the corresponding row in the database with a completion date. This causes the content of that table to grow over the lifecycle of an application. Developers have to manually purge old entries using the
CompletedEventPublications
abstraction.It would be nice if developers could opt into a “complete by deletion” mode, in which, instead of setting a completion date, an event publication row would be deleted instead.
Required steps
spring.modulith.events.completion-strategy
with two values:UPDATE
(current algorithm) andDELETE
(new algorithm).EventPublicationRepository
implementations would inspect that configuration property to alter their database interaction accordinglyUPDATE
to aDELETE
.I don't think we'd need to tweak the schema initialization functionality, which could theoretically create an optimized schema if the new algorithm is activated. Users usually roll their own schema initialization scripts in production anyway.
The text was updated successfully, but these errors were encountered: