From af66a68f1376ca262491b0838b650e18c380f81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Seonghyeon=20Cho=20=28=EC=A1=B0=EC=84=B1=ED=98=84=29?= Date: Tue, 20 May 2025 00:51:58 +0900 Subject: [PATCH] Replace deprecated `FixedDelay` in docs (#3912) * Replace `FixedDelayStrategy` to `SameIntervalTopicReuseStrategy` in docs * `useSingleTopicForFixedDelays` -> `useSingleTopicForSameIntervals` Signed-off-by: Seonghyeon Cho (cherry picked from commit f83cb266e7825834050f6820673b6ed22613dbd4) --- .../antora/modules/ROOT/pages/retrytopic/topic-naming.adoc | 4 ++-- .../kafka/annotation/EnableKafkaRetryTopic.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/topic-naming.adoc b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/topic-naming.adoc index 1d97f7a2..d108a761 100644 --- a/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/topic-naming.adoc +++ b/spring-kafka-docs/src/main/antora/modules/ROOT/pages/retrytopic/topic-naming.adoc @@ -79,7 +79,7 @@ NOTE: The previous `FixedDelayStrategy` is now deprecated, and can be replaced b [source, java] ---- -@RetryableTopic(backoff = @Backoff(2_000), fixedDelayTopicStrategy = FixedDelayStrategy.SINGLE_TOPIC) +@RetryableTopic(backoff = @Backoff(2_000), sameIntervalTopicReuseStrategy = SameIntervalTopicReuseStrategy.SINGLE_TOPIC) @KafkaListener(topics = "my-annotated-topic") public void processMessage(MyPojo message) { // ... message processing @@ -94,7 +94,7 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate templa .newInstance() .fixedBackOff(3_000) .maxAttempts(5) - .useSingleTopicForFixedDelays() + .useSingleTopicForSameIntervals() .create(template); } ---- diff --git a/spring-kafka/src/main/java/org/springframework/kafka/annotation/EnableKafkaRetryTopic.java b/spring-kafka/src/main/java/org/springframework/kafka/annotation/EnableKafkaRetryTopic.java index a798c76c..f6c4e152 100644 --- a/spring-kafka/src/main/java/org/springframework/kafka/annotation/EnableKafkaRetryTopic.java +++ b/spring-kafka/src/main/java/org/springframework/kafka/annotation/EnableKafkaRetryTopic.java @@ -39,7 +39,7 @@ import org.springframework.kafka.retrytopic.RetryTopicConfigurationSupport; * @Component * public class MyListener { * - * @RetryableTopic(fixedDelayTopicStrategy = FixedDelayStrategy.SINGLE_TOPIC, backoff = @Backoff(4000)) + * @RetryableTopic(sameIntervalTopicReuseStrategy = SameIntervalTopicReuseStrategy.SINGLE_TOPIC, backoff = @Backoff(4000)) * @KafkaListener(topics = "myTopic") * public void listen(String message, @Header(KafkaHeaders.RECEIVED_TOPIC) String receivedTopic) { * logger.info("Message {} received in topic {} ", message, receivedTopic);