Class ContainerPausingBackOffHandler
java.lang.Object
org.springframework.kafka.listener.ContainerPausingBackOffHandler
- All Implemented Interfaces:
BackOffHandler
A
BackOffHandler
that pauses the container for the backoff.- Since:
- 2.9
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
onNextBackOff
(MessageListenerContainer container, Exception exception, long nextBackOff) Perform the next back off.void
onNextBackOff
(MessageListenerContainer container, org.apache.kafka.common.TopicPartition partition, long nextBackOff) Perform the next back off for a partition.
-
Constructor Details
-
ContainerPausingBackOffHandler
Create an instance with the providedListenerContainerPauseService
.- Parameters:
pauser
- the pause service.
-
-
Method Details
-
onNextBackOff
public void onNextBackOff(@Nullable MessageListenerContainer container, Exception exception, long nextBackOff) Description copied from interface:BackOffHandler
Perform the next back off.- Specified by:
onNextBackOff
in 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:BackOffHandler
Perform the next back off for a partition.- Specified by:
onNextBackOff
in interfaceBackOffHandler
- Parameters:
container
- the container.partition
- the partition.nextBackOff
- the next back off.
-