diff --git a/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java b/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java index 43136631ab..fc95af188c 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/core/KafkaTemplate.java @@ -244,7 +244,10 @@ public void setDefaultTopic(String defaultTopic) { * a send operation. By default a {@link LoggingProducerListener} is configured * which logs errors only. * @param producerListener the listener; may be {@code null}. + * @deprecated in favor of {@link #setProducerInterceptor(ProducerInterceptor)} + * @see #setProducerInterceptor(ProducerInterceptor) */ + @Deprecated(since = "3.0", forRemoval = true) public void setProducerListener(@Nullable ProducerListener producerListener) { this.producerListener = producerListener; } diff --git a/spring-kafka/src/main/java/org/springframework/kafka/support/CompositeProducerListener.java b/spring-kafka/src/main/java/org/springframework/kafka/support/CompositeProducerListener.java index ab1d2a27a3..a4b861eae7 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/support/CompositeProducerListener.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/support/CompositeProducerListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2018-2020 the original author or authors. + * Copyright 2018-2022 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. @@ -35,8 +35,10 @@ * @author Artem Bilan * * @since 2.1.6 - * + * @deprecated since 3.0 in favor of {@link org.springframework.kafka.support.CompositeProducerInterceptor} */ + +@Deprecated(since = "3.0", forRemoval = true) public class CompositeProducerListener implements ProducerListener { private final List> delegates = new CopyOnWriteArrayList<>(); diff --git a/spring-kafka/src/main/java/org/springframework/kafka/support/LoggingProducerListener.java b/spring-kafka/src/main/java/org/springframework/kafka/support/LoggingProducerListener.java index a4c001bf35..341a9f757e 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/support/LoggingProducerListener.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/support/LoggingProducerListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2021 the original author or authors. + * Copyright 2015-2022 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. @@ -32,7 +32,10 @@ * * @author Marius Bogoevici * @author Gary Russell + * @deprecated since 3.0 in favor of {@link org.apache.kafka.clients.producer.ProducerInterceptor} */ + +@Deprecated(since = "3.0", forRemoval = true) public class LoggingProducerListener implements ProducerListener { /** diff --git a/spring-kafka/src/main/java/org/springframework/kafka/support/ProducerListener.java b/spring-kafka/src/main/java/org/springframework/kafka/support/ProducerListener.java index c9d84c7b5d..30a4825987 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/support/ProducerListener.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/support/ProducerListener.java @@ -1,5 +1,5 @@ /* - * Copyright 2015-2020 the original author or authors. + * Copyright 2015-2022 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. @@ -36,7 +36,11 @@ * @author Endika GutiƩrrez * * @see org.apache.kafka.clients.producer.Callback + * + * @deprecated since 3.0 in favor of {@link org.apache.kafka.clients.producer.ProducerInterceptor} */ + +@Deprecated(since = "3.0", forRemoval = true) public interface ProducerListener { /**