Skip to content

Commit 1dcf11d

Browse files
jucosoringaryrussell
authored andcommitted
GH-2516: Fix code example for Non-Blocking Retries
Resolves #2516 Fixes GH-2516 Fixes GH-2516 Fix copyright.
1 parent 0d1727d commit 1dcf11d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

spring-kafka-docs/src/main/asciidoc/retrytopic.adoc

+3-3
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ The framework provides a few strategies for working with DLTs. You can provide a
840840

841841
===== Dlt Processing Method
842842

843-
You can specify the method used to process the Dlt for the topic, as well as the behavior if that processing fails.
843+
You can specify the method used to process the DLT for the topic, as well as the behavior if that processing fails.
844844

845845
To do that you can use the `@DltHandler` annotation in a method of the class with the `@RetryableTopic` annotation(s).
846846
Note that the same method will be used for all the `@RetryableTopic` annotated methods within that class.
@@ -870,7 +870,7 @@ The DLT handler method can also be provided through the RetryTopicConfigurationB
870870
public RetryTopicConfiguration myRetryTopic(KafkaTemplate<Integer, MyPojo> template) {
871871
return RetryTopicConfigurationBuilder
872872
.newInstance()
873-
.dltProcessor("myCustomDltProcessor", "processDltMessage")
873+
.dltHandlerMethod("myCustomDltProcessor", "processDltMessage")
874874
.create(template);
875875
}
876876
@@ -923,7 +923,7 @@ public void processMessage(MyPojo message) {
923923
public RetryTopicConfiguration myRetryTopic(KafkaTemplate<Integer, MyPojo> template) {
924924
return RetryTopicConfigurationBuilder
925925
.newInstance()
926-
.dltProcessor(MyCustomDltProcessor.class, "processDltMessage")
926+
.dltHandlerMethod("myCustomDltProcessor", "processDltMessage")
927927
.doNotRetryOnDltFailure()
928928
.create(template);
929929
}

spring-kafka/src/main/java/org/springframework/kafka/retrytopic/RetryTopicConfigurer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2018-2022 the original author or authors.
2+
* Copyright 2018-2023 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.
@@ -178,7 +178,7 @@
178178
* public RetryTopicConfiguration otherRetryTopic(KafkaTemplate&lt;Integer, MyPojo&gt; template) {
179179
* return RetryTopicConfigurationBuilder
180180
* .newInstance()
181-
* .dltProcessor(MyCustomDltProcessor.class, "processDltMessage")
181+
* .dltHandlerMethod("myCustomDltProcessor", "processDltMessage")
182182
* .create(template);
183183
* }</code>
184184
*

0 commit comments

Comments
 (0)