Skip to content

Commit 723cc18

Browse files
Add test cases.
1 parent 87ac522 commit 723cc18

File tree

5 files changed

+2545
-5
lines changed

5 files changed

+2545
-5
lines changed

spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/MessagingMessageListenerAdapter.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -911,10 +911,6 @@ public void acknowledge() {
911911

912912
}
913913

914-
public void setAsyncRetryCallback(BiConsumer<ConsumerRecord<K, V>, RuntimeException> asyncRetryCallback) {
915-
this.asyncRetryCallback = asyncRetryCallback;
916-
}
917-
918914
public void putInAsyncFailureQueue(java.util.function.Consumer<FailedRecordTuple> callbackForAsyncFailureQueue) {
919915
this.callbackForAsyncFailureQueue = callbackForAsyncFailureQueue;
920916
}

spring-kafka/src/main/java/org/springframework/kafka/listener/adapter/RecordMessagingMessageListenerAdapter.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import org.apache.kafka.clients.consumer.Consumer;
2222
import org.apache.kafka.clients.consumer.ConsumerRecord;
2323

24+
import org.springframework.kafka.core.FailedRecordTuple;
2425
import org.springframework.kafka.listener.AcknowledgingConsumerAwareMessageListener;
2526
import org.springframework.kafka.listener.KafkaListenerErrorHandler;
2627
import org.springframework.kafka.support.Acknowledgment;
@@ -85,4 +86,9 @@ public void onMessage(ConsumerRecord<K, V> record, @Nullable Acknowledgment ackn
8586
invoke(record, acknowledgment, consumer, message);
8687
}
8788

89+
@Override
90+
public void setCallbackForAsyncFailureQueue(
91+
java.util.function.Consumer<FailedRecordTuple> asyncRetryCallback) {
92+
putInAsyncFailureQueue(asyncRetryCallback);
93+
}
8894
}

spring-kafka/src/test/java/org/springframework/kafka/retrytopic/AsyncCompletableFutureRetryTopicClassLevelIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2021 the original author or authors.
2+
* Copyright 2018-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)