Skip to content

Commit 810a4c8

Browse files
tomazfernandesgaryrussell
authored andcommitted
Add what's new and docs for RT's new features
1 parent 427b024 commit 810a4c8

File tree

2 files changed

+18
-10
lines changed

2 files changed

+18
-10
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,7 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate<String, MyPojo> templa
274274

275275
NOTE: The default is having no timeout set, which can also be achieved by providing -1 as the timout value.
276276

277+
[[retry-topic-ex-classifier]]
277278
===== Exception Classifier
278279

279280
You can specify which exceptions you want to retry on and which not to.
@@ -307,8 +308,8 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate<String, MyOtherPojo> t
307308
NOTE: The default behavior is retrying on all exceptions and not traversing causes.
308309

309310
Since 2.8.3 there's a global list of fatal exceptions which will cause the record to be sent to the DLT without any retries.
310-
See <<default-eh, DefaultErrorHandler>> for the default list of fatal exceptions.
311-
You can add or remove exceptions with:
311+
See <<default-eh>> for the default list of fatal exceptions.
312+
You can add or remove exceptions to and from this list with:
312313

313314
====
314315
[source, java]
@@ -642,10 +643,10 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate<Integer, MyPojo> templ
642643

643644
NOTE: The default behavior is to `ALWAYS_RETRY_ON_ERROR`.
644645

645-
IMPORTANT: Starting with version 2.8, `ALWAYS_RETRY_ON_ERROR` will NOT route a record back to the DLT if the record causes a fatal exception to be thrown,
646+
IMPORTANT: Starting with version 2.8.3, `ALWAYS_RETRY_ON_ERROR` will NOT route a record back to the DLT if the record causes a fatal exception to be thrown,
646647
such as a `DeserializationException` because, generally, such exceptions will always be thrown.
647648

648-
Exceptions that are considered fatal are
649+
Exceptions that are considered fatal are:
649650

650651
* `DeserializationException`
651652
* `MessageConversionException`
@@ -654,7 +655,10 @@ Exceptions that are considered fatal are
654655
* `NoSuchMethodException`
655656
* `ClassCastException`
656657

657-
You can add exceptions to and remove exceptions from this list using methods on the `DeadLetterPublishingRecovererFactory` bean.
658+
You can add exceptions to and remove exceptions from this list using methods on the `DestinationTopicResolver` bean.
659+
660+
See <<retry-topic-ex-classifier>> for more information.
661+
658662

659663
===== Configuring No DLT
660664

@@ -685,7 +689,7 @@ public RetryTopicConfiguration myRetryTopic(KafkaTemplate<Integer, MyPojo> templ
685689
----
686690
====
687691

688-
692+
[[retry-topic-lcf]]
689693
==== Specifying a ListenerContainerFactory
690694

691695
By default the RetryTopic configuration will use the provided factory from the `@KafkaListener` annotation, but you can specify a different one to be used to create the retry topic and dlt listener containers.
@@ -723,7 +727,6 @@ public RetryTopicConfiguration myOtherRetryTopic(KafkaTemplate<Integer, MyPojo>
723727
----
724728
====
725729

726-
727730
IMPORTANT: Since 2.8.3 you can use the same factory for retryable and non-retryable topics.
728731

729732
If you need to revert the factory configuration behavior to prior 2.8.3, you can replace the standard `RetryTopicConfigurer` bean and set `useLegacyFactoryConfigurer` to `true`, such as:

spring-kafka-docs/src/main/asciidoc/whats-new.adoc

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,14 @@ The property `stripPreviousExceptionHeaders` is now `true` by default.
7979

8080
See <<dlpr-headers>> for more information.
8181

82-
[[x28-kafka-back-off-exception-log-level]]
83-
==== KafkaBackOffException Log Level Changes
82+
[[x28-retryable-topics-changes]]
83+
==== Retryable Topics Changes
8484

85-
The KafkaBackOffException thrown when using the retryable topics feature is now logged at DEBUG level.
85+
Now you can use the same factory for retryable and non-retryable topics.
86+
See <<retry-topic-lcf>> for more information.
87+
88+
There's now a manageable global list of fatal exceptions that will make the failed record go straight to the DLT.
89+
Refer to <<retry-topic-ex-classifier>> to see how to manage it.
8690

91+
The KafkaBackOffException thrown when using the retryable topics feature is now logged at DEBUG level.
8792
See <<change-kboe-logging-level>> if you need to change the logging level back to WARN or set it to any other level.

0 commit comments

Comments
 (0)