Skip to content

Commit 7e86fb8

Browse files
Change DHE in LCFC to defaultFalse
With this we no longer need a no ops back off. Some minor adjustments were needed to maintain behavior when the logic gets to DLPR.
1 parent 85cab3f commit 7e86fb8

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

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

-32
Original file line numberDiff line numberDiff line change
@@ -328,38 +328,6 @@ public DefaultDestinationTopicResolver topicResolver(ApplicationContext applicat
328328

329329
NOTE: To disable fatal exceptions' classification, clear the default list using the `setClassifications` method in `DefaultDestinationTopicResolver`.
330330

331-
332-
[[retry-topic-combine-blocking]]
333-
===== Combine blocking and non-blocking retries
334-
335-
Starting in 2.8.3 you can configure the framework to use both blocking and non-blocking retries in conjunction.
336-
For example, you can have a set of exceptions that would likely trigger errors on the next records as well, such as `DatabaseAccessException`, so you can retry the same record a few times before sending it to the retry topic, or straight to the DLT.
337-
338-
You can configure the blocking retries as follows:
339-
340-
====
341-
[source, java]
342-
----
343-
@Bean(name = RetryTopicInternalBeanNames.LISTENER_CONTAINER_FACTORY_CONFIGURER_NAME)
344-
public ListenerContainerFactoryConfigurer lcfc(KafkaConsumerBackoffManager kafkaConsumerBackoffManager,
345-
DeadLetterPublishingRecovererFactory deadLetterPublishingRecovererFactory,
346-
@Qualifier(RetryTopicInternalBeanNames
347-
.INTERNAL_BACKOFF_CLOCK_BEAN_NAME) Clock clock) {
348-
ListenerContainerFactoryConfigurer lcfc = new ListenerContainerFactoryConfigurer(kafkaConsumerBackoffManager, deadLetterPublishingRecovererFactory, clock);
349-
lcfc.setBlockingRetriesBackOff(new FixedBackOff(50, 3));
350-
lcfc.setErrorHandlerCustomizer(commonErrorHandler -> ((DefaultErrorHandler) commonErrorHandler)
351-
.addNotRetryableExceptions(MyFatalException.class);
352-
return lcfc;
353-
}
354-
----
355-
====
356-
357-
NOTE: If you set a blocking retry back off, the default is to retry on all exceptions except the fatal ones in <<default-eh>>.
358-
You can add or remove exceptions using the `addNotRetryableException` and `removeNotRetryableException` methods in the `ListenerContainerFactoryConfigurer`.
359-
360-
NOTE: In combination with the global retryable topic's fatal classification, you can configure the framework for any behavior you'd like, such as having some exceptions trigger both blocking and non-blocking retries, trigger only one kind or the other, or go straight to the DLT without retries of any kind.
361-
362-
363331
[[retry-topic-combine-blocking]]
364332
===== Combine blocking and non-blocking retries
365333

0 commit comments

Comments
 (0)