Class ContainerPausingBackOffHandler
- java.lang.Object
-
- org.springframework.kafka.listener.ContainerPausingBackOffHandler
-
- All Implemented Interfaces:
BackOffHandler
public class ContainerPausingBackOffHandler extends java.lang.Object implements BackOffHandler
ABackOffHandlerthat pauses the container for the backoff.- Since:
- 2.9
- Author:
- Gary Russell
-
-
Constructor Summary
Constructors Constructor Description ContainerPausingBackOffHandler(ListenerContainerPauseService pauser)Create an instance with the providedListenerContainerPauseService.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonNextBackOff(MessageListenerContainer container, java.lang.Exception exception, long nextBackOff)Perform the next back off.voidonNextBackOff(MessageListenerContainer container, org.apache.kafka.common.TopicPartition partition, long nextBackOff)Perform the next back off for a partition.
-
-
-
Constructor Detail
-
ContainerPausingBackOffHandler
public ContainerPausingBackOffHandler(ListenerContainerPauseService pauser)
Create an instance with the providedListenerContainerPauseService.- Parameters:
pauser- the pause service.
-
-
Method Detail
-
onNextBackOff
public void onNextBackOff(@Nullable MessageListenerContainer container, java.lang.Exception exception, long nextBackOff)Description copied from interface:BackOffHandlerPerform the next back off.- Specified by:
onNextBackOffin interfaceBackOffHandler- Parameters:
container- the container.exception- the exception.nextBackOff- the next back off.
-
onNextBackOff
public void onNextBackOff(MessageListenerContainer container, org.apache.kafka.common.TopicPartition partition, long nextBackOff)
Description copied from interface:BackOffHandlerPerform the next back off for a partition.- Specified by:
onNextBackOffin interfaceBackOffHandler- Parameters:
container- the container.partition- the partition.nextBackOff- the next back off.
-
-