Package org.springframework.kafka.config
Class RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer
- java.lang.Object
-
- org.springframework.kafka.config.RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer
-
- Enclosing class:
- RetryTopicConfigurationSupport
public static class RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer extends java.lang.ObjectConfigure theKafkaConsumerBackoffManagerinstance.
-
-
Constructor Summary
Constructors Constructor Description KafkaBackOffManagerConfigurer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurerdisableTimingAdjustment()Disable timing adjustment for the delays.RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurersetClock(java.time.Clock clock)Set theClockinstance to be used with theKafkaConsumerBackoffManager.RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurersetMaxThreadPoolSize(int maxThreadPoolSize)Set the maximum thread pool size to be used by theWakingKafkaConsumerTimingAdjuster.
-
-
-
Method Detail
-
disableTimingAdjustment
public RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer 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:
WakingKafkaConsumerTimingAdjuster
-
setMaxThreadPoolSize
public RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer setMaxThreadPoolSize(int maxThreadPoolSize)
Set the maximum thread pool size to be used by theWakingKafkaConsumerTimingAdjuster. ThisKafkaConsumerTimingAdjusterimplementation 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
public RetryTopicConfigurationSupport.KafkaBackOffManagerConfigurer setClock(java.time.Clock clock)
Set theClockinstance to be used with theKafkaConsumerBackoffManager.- Parameters:
clock- the clock instance.- Returns:
- the configurer.
-
-