diff --git a/samples/sample-01/src/main/java/com/example/Application.java b/samples/sample-01/src/main/java/com/example/Application.java index ef5cf8c6fd..9ba7859135 100644 --- a/samples/sample-01/src/main/java/com/example/Application.java +++ b/samples/sample-01/src/main/java/com/example/Application.java @@ -79,7 +79,7 @@ public void listen(Foo2 foo) { this.exec.execute(() -> System.out.println("Hit Enter to terminate...")); } - @KafkaListener(id = "dltGroup", topics = "topic1.DLT") + @KafkaListener(id = "dltGroup", topics = "topic1-dlt") public void dltListen(byte[] in) { logger.info("Received from DLT: " + new String(in)); this.exec.execute(() -> System.out.println("Hit Enter to terminate...")); @@ -92,7 +92,7 @@ public NewTopic topic() { @Bean public NewTopic dlt() { - return new NewTopic("topic1.DLT", 1, (short) 1); + return new NewTopic("topic1-dlt", 1, (short) 1); } @Bean diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/annotation-error-handling.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/annotation-error-handling.adoc index 777f46589a..c6feb79311 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/annotation-error-handling.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/kafka/annotation-error-handling.adoc @@ -743,7 +743,7 @@ public ErrorHandler eh(KafkaOperations template) { retries.value()[0]++; } return retries.value()[0] > 5 - ? new TopicPartition("topic.DLT", rec.partition()) + ? new TopicPartition("topic-dlt", rec.partition()) : new TopicPartition("topic", rec.partition()); }), new FixedBackOff(0L, 0L)); } diff --git a/spring-kafka/src/main/java/org/springframework/kafka/listener/DeadLetterPublishingRecoverer.java b/spring-kafka/src/main/java/org/springframework/kafka/listener/DeadLetterPublishingRecoverer.java index f0583b095e..dc5a9c0fb3 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/listener/DeadLetterPublishingRecoverer.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/listener/DeadLetterPublishingRecoverer.java @@ -140,7 +140,7 @@ public class DeadLetterPublishingRecoverer extends ExceptionClassifier implement /** * Create an instance with the provided template and a default destination resolving - * function that returns a TopicPartition based on the original topic (appended with ".DLT") + * function that returns a TopicPartition based on the original topic (appended with "-dlt") * from the failed record, and the same partition as the failed record. Therefore the * dead-letter topic must have at least as many partitions as the original topic. * @param template the {@link KafkaOperations} to use for publishing. @@ -165,7 +165,7 @@ public DeadLetterPublishingRecoverer(KafkaOperations