From c9cc3a7ce0b15dd0a3a7a750d075de3aa23342a1 Mon Sep 17 00:00:00 2001 From: Cora Iberkleid Date: Tue, 22 Oct 2024 10:26:48 -0400 Subject: [PATCH] GH-806 - Add archiving completion mode. We now support an archiving completion mode that copies the entry to be completed into a dedicated archive to retain the completed event publications but also keep the main publication store small for more efficient data access. Co-authored-by: Oliver Drotbohm --- .../modulith/events/support/CompletionMode.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/spring-modulith-events/spring-modulith-events-core/src/main/java/org/springframework/modulith/events/support/CompletionMode.java b/spring-modulith-events/spring-modulith-events-core/src/main/java/org/springframework/modulith/events/support/CompletionMode.java index 37158e8e..36fb2977 100644 --- a/spring-modulith-events/spring-modulith-events-core/src/main/java/org/springframework/modulith/events/support/CompletionMode.java +++ b/spring-modulith-events/spring-modulith-events-core/src/main/java/org/springframework/modulith/events/support/CompletionMode.java @@ -36,7 +36,13 @@ public enum CompletionMode { /** * Completes an {@link org.springframework.modulith.events.EventPublication} by removing the database entry. */ - DELETE; + DELETE, + + /** + * Completes an {@link org.springframework.modulith.events.EventPublication} by moving the database entry to + * an archive. + */ + ARCHIVE; public static final String PROPERTY = "spring.modulith.events.completion-mode";