Skip to content

Commit 192e9e2

Browse files
alexisgraspring-builds
authored andcommitted
GH-3693: Remove outdated DLT Topic Suffix references from Javadoc, reference doc and code sample. (#3831)
Fixes: #3693 Issue link: #3693 Signed-off-by: Alexis SEGURA <[email protected]> Co-authored-by: Alexis SEGURA <[email protected]> (cherry picked from commit e2a39cd)
1 parent 09018f8 commit 192e9e2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

samples/sample-01/src/main/java/com/example/Application.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public void listen(Foo2 foo) {
7979
this.exec.execute(() -> System.out.println("Hit Enter to terminate..."));
8080
}
8181

82-
@KafkaListener(id = "dltGroup", topics = "topic1.DLT")
82+
@KafkaListener(id = "dltGroup", topics = "topic1-dlt")
8383
public void dltListen(byte[] in) {
8484
logger.info("Received from DLT: " + new String(in));
8585
this.exec.execute(() -> System.out.println("Hit Enter to terminate..."));
@@ -92,7 +92,7 @@ public NewTopic topic() {
9292

9393
@Bean
9494
public NewTopic dlt() {
95-
return new NewTopic("topic1.DLT", 1, (short) 1);
95+
return new NewTopic("topic1-dlt", 1, (short) 1);
9696
}
9797

9898
@Bean

spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/annotation-error-handling.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public ErrorHandler eh(KafkaOperations<String, String> template) {
743743
retries.value()[0]++;
744744
}
745745
return retries.value()[0] > 5
746-
? new TopicPartition("topic.DLT", rec.partition())
746+
? new TopicPartition("topic-dlt", rec.partition())
747747
: new TopicPartition("topic", rec.partition());
748748
}), new FixedBackOff(0L, 0L));
749749
}

spring-kafka/src/main/java/org/springframework/kafka/listener/DeadLetterPublishingRecoverer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public class DeadLetterPublishingRecoverer extends ExceptionClassifier implement
139139

140140
/**
141141
* Create an instance with the provided template and a default destination resolving
142-
* function that returns a TopicPartition based on the original topic (appended with ".DLT")
142+
* function that returns a TopicPartition based on the original topic (appended with "-dlt")
143143
* from the failed record, and the same partition as the failed record. Therefore the
144144
* dead-letter topic must have at least as many partitions as the original topic.
145145
* @param template the {@link KafkaOperations} to use for publishing.
@@ -164,7 +164,7 @@ public DeadLetterPublishingRecoverer(KafkaOperations<? extends Object, ? extends
164164
/**
165165
* Create an instance with the provided templates and a default destination resolving
166166
* function that returns a TopicPartition based on the original topic (appended with
167-
* ".DLT") from the failed record, and the same partition as the failed record.
167+
* "-dlt") from the failed record, and the same partition as the failed record.
168168
* Therefore the dead-letter topic must have at least as many partitions as the
169169
* original topic. The templates map keys are classes and the value the corresponding
170170
* template to use for objects (producer record values) of that type. A

0 commit comments

Comments
 (0)