Class RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer
java.lang.Object
org.springframework.kafka.retrytopic.RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer
- Enclosing class:
- RetryTopicConfigurationSupport
Configure the
KafkaConsumerBackoffManager
instance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDisable timing adjustment for the delays.Set theClock
instance to be used with theKafkaConsumerBackoffManager
.setMaxThreadPoolSize
(int maxThreadPoolSize) Set the maximum thread pool size to be used by theWakingKafkaConsumerTimingAdjuster
.
-
Constructor Details
-
KafkaBackOffManagerConfigurer
public KafkaBackOffManagerConfigurer()
-
-
Method Details
-
disableTimingAdjustment
Disable timing adjustment for the delays. By choosing this option records won't be processed exactly at the proper time. It's guaranteed however that records won't be processed before their due time.- Returns:
- the configurer.
- See Also:
-
setMaxThreadPoolSize
public RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer setMaxThreadPoolSize(int maxThreadPoolSize) Set the maximum thread pool size to be used by theWakingKafkaConsumerTimingAdjuster
. ThisKafkaConsumerTimingAdjuster
implementation spawns threads that will sleep for a calculated time, and after that willConsumer.wakeup()
the consumer, in order to improve delay precision.- Parameters:
maxThreadPoolSize
- the maximum thread pool size.- Returns:
- the configurer.
-
setClock
Set theClock
instance to be used with theKafkaConsumerBackoffManager
.- Parameters:
clock
- the clock instance.- Returns:
- the configurer.
-