From eca375066ce777ea61e096b40ca894675186ef2f Mon Sep 17 00:00:00 2001 From: Borahm Lee Date: Wed, 4 Dec 2024 05:50:59 +0900 Subject: [PATCH] Update DLT log message and docs (#3656) --- .../antora/modules/ROOT/pages/retrytopic/dlt-strategies.adoc | 2 +- .../main/antora/modules/ROOT/pages/retrytopic/features.adoc | 1 - .../kafka/listener/DeadLetterPublishingRecoverer.java | 3 ++- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/dlt-strategies.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/dlt-strategies.adoc index 8741ed560e..cd2c3432f8 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/dlt-strategies.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/dlt-strategies.adoc @@ -22,7 +22,7 @@ public void processMessage(MyPojo message) { } @DltHandler -public void processMessage(MyPojo message) { +public void processDltMessage(MyPojo message) { // ... message processing, persistence, etc } ---- diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/features.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/features.adoc index 0e7d3d266a..ff97cb57bd 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/features.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/features.adoc @@ -291,7 +291,6 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate templa return RetryTopicConfigurationBuilder .newInstance() .dltRoutingRules(Map.of("-deserialization", Set.of(DeserializationException.class))) - .create(kafkaOperations) .create(template); } ---- 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 9cbec59558..924e4ebceb 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 @@ -65,6 +65,7 @@ * @author Gary Russell * @author Tomaz Fernandes * @author Watlas R + * @author Borahm Lee * @since 2.2 * */ @@ -571,7 +572,7 @@ private void sendOrThrow(ProducerRecord outRecord, private void maybeThrow(ConsumerRecord record, Exception exception) { String message = String.format("No destination returned for record %s and exception %s. " + - "failIfNoDestinationReturned: %s", KafkaUtils.format(record), exception, + "throwIfNoDestinationReturned: %s", KafkaUtils.format(record), exception, this.throwIfNoDestinationReturned); this.logger.warn(message); if (this.throwIfNoDestinationReturned) {