diff --git a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/kafka/KafkaItemWriter.java b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/kafka/KafkaItemWriter.java index c494b9333..a542bd87c 100644 --- a/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/kafka/KafkaItemWriter.java +++ b/spring-batch-infrastructure/src/main/java/org/springframework/batch/item/kafka/KafkaItemWriter.java @@ -1,5 +1,5 @@ /* - * Copyright 2019-2022 the original author or authors. + * Copyright 2019-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,6 +33,10 @@ import java.util.concurrent.TimeUnit; * with default topic configured. *

* + *

+ * This writer is not thread-safe. + *

+ * * @author Mathieu Ouellet * @author Mahmoud Ben Hassine * @since 4.2 @@ -42,7 +46,7 @@ public class KafkaItemWriter extends KeyValueItemWriter { protected KafkaTemplate kafkaTemplate; - private final List>> completableFutures = new ArrayList<>(); + protected final List>> completableFutures = new ArrayList<>(); private long timeout = -1;