Class DefaultBackOffHandler

java.lang.Object
org.springframework.kafka.listener.DefaultBackOffHandler
All Implemented Interfaces:
BackOffHandler

public class DefaultBackOffHandler extends Object implements BackOffHandler
Default BackOffHandler; suspends the thread for the back off. If a container is provided, ListenerUtils.stoppableSleep(MessageListenerContainer, long) is used, to terminate the suspension if the container is stopped.
Since:
2.9
  • Constructor Details

    • DefaultBackOffHandler

      public DefaultBackOffHandler()
  • Method Details

    • onNextBackOff

      public void onNextBackOff(@Nullable MessageListenerContainer container, @Nullable Exception exception, long nextBackOff)
      Description copied from interface: BackOffHandler
      Perform the next back off.
      Specified by:
      onNextBackOff in interface BackOffHandler
      Parameters:
      container - the container.
      exception - the exception.
      nextBackOff - the next back off.