Skip to content

Commit 8336461

Browse files
committed
Deprecate ListenableFuture Callback Extensions
1 parent ea6fa8f commit 8336461

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

spring-kafka/src/main/java/org/springframework/kafka/core/KafkaFailureCallback.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.kafka.core;
1818

19+
import java.util.function.BiConsumer;
20+
1921
import org.springframework.util.concurrent.FailureCallback;
2022

2123
/**
@@ -27,8 +29,11 @@
2729
*
2830
* @author Gary Russell
2931
* @since 2.5
32+
* @deprecated as of 2.9.1, in favor of
33+
* {@link java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)}
3034
*
3135
*/
36+
@Deprecated
3237
@FunctionalInterface
3338
public interface KafkaFailureCallback<K, V> extends FailureCallback {
3439

spring-kafka/src/main/java/org/springframework/kafka/core/KafkaSendCallback.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package org.springframework.kafka.core;
1818

19+
import java.util.function.BiConsumer;
20+
1921
import org.springframework.kafka.support.SendResult;
2022
import org.springframework.util.concurrent.ListenableFutureCallback;
2123

@@ -28,8 +30,11 @@
2830
*
2931
* @author Gary Russell
3032
* @since 2.5
33+
* @deprecated as of 2.9.1, in favor of
34+
* {@link java.util.concurrent.CompletableFuture#whenComplete(BiConsumer)}
3135
*
3236
*/
37+
@Deprecated
3338
public interface KafkaSendCallback<K, V> extends ListenableFutureCallback<SendResult<K, V>>, KafkaFailureCallback<K, V> {
3439

3540
}

0 commit comments

Comments
 (0)