Class AbstractRetryingMessageListenerAdapter<K,V,T>

java.lang.Object
org.springframework.kafka.listener.adapter.AbstractDelegatingMessageListenerAdapter<T>
org.springframework.kafka.listener.adapter.AbstractRetryingMessageListenerAdapter<K,V,T>
Type Parameters:
K - the key type.
V - the value type.
T - the delegate type.
All Implemented Interfaces:
ConsumerSeekAware, DelegatingMessageListener<T>

public abstract class AbstractRetryingMessageListenerAdapter<K,V,T> extends AbstractDelegatingMessageListenerAdapter<T>
Base class for retrying message listener adapters.
Author:
Gary Russell
  • Constructor Details

    • AbstractRetryingMessageListenerAdapter

      public AbstractRetryingMessageListenerAdapter(T delegate, org.springframework.retry.support.RetryTemplate retryTemplate)
      Construct an instance with the supplied retry template. The exception will be thrown to the container after retries are exhausted.
      Parameters:
      delegate - the delegate listener.
      retryTemplate - the template.
    • AbstractRetryingMessageListenerAdapter

      public AbstractRetryingMessageListenerAdapter(T delegate, org.springframework.retry.support.RetryTemplate retryTemplate, @Nullable org.springframework.retry.RecoveryCallback<? extends Object> recoveryCallback)
      Construct an instance with the supplied template and callback.
      Parameters:
      delegate - the delegate listener.
      retryTemplate - the template.
      recoveryCallback - the recovery callback; if null, the exception will be thrown to the container after retries are exhausted.
  • Method Details

    • getRetryTemplate

      public org.springframework.retry.support.RetryTemplate getRetryTemplate()
    • getRecoveryCallback

      public org.springframework.retry.RecoveryCallback<? extends Object> getRecoveryCallback()