From 17b9fa77c762e48b0c01d181ca097b912f133fd9 Mon Sep 17 00:00:00 2001 From: Paul Ebermann Date: Fri, 28 Jul 2023 21:00:09 +0200 Subject: [PATCH] Add configuration property for enabling deleteAfterWrite --- .../nakadiproducer/NakadiProducerAutoConfiguration.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java b/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java index 764474d..9ee58ea 100644 --- a/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java +++ b/nakadi-producer-spring-boot-starter/src/main/java/org/zalando/nakadiproducer/NakadiProducerAutoConfiguration.java @@ -139,8 +139,9 @@ public SnapshotCreationService snapshotCreationService( @Bean public EventLogWriter eventLogWriter(EventLogRepository eventLogRepository, ObjectMapper objectMapper, - FlowIdComponent flowIdComponent, List extractorList) { - return new EventLogWriterImpl(eventLogRepository, objectMapper, flowIdComponent, extractorList, false); + FlowIdComponent flowIdComponent, List extractorList, + @Value("${nakadi-producer.deleteAfterWrite:false}") boolean deleteAfterWrite) { + return new EventLogWriterImpl(eventLogRepository, objectMapper, flowIdComponent, extractorList, deleteAfterWrite); } @Bean