Class RetryingMessageListenerAdapter<K,V>

Type Parameters:
K - the key type.
V - the value type.
All Implemented Interfaces:
AcknowledgingConsumerAwareMessageListener<K,V>, ConsumerSeekAware, DelegatingMessageListener<MessageListener<K,V>>, GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>, MessageListener<K,V>

@Deprecated public class RetryingMessageListenerAdapter<K,V> extends AbstractRetryingMessageListenerAdapter<K,V,MessageListener<K,V>> implements AcknowledgingConsumerAwareMessageListener<K,V>
Deprecated.
since 2.8 - use a suitably configured error handler instead.
A retrying message listener adapter for MessageListeners.
Author:
Gary Russell
  • Field Details

    • CONTEXT_ACKNOWLEDGMENT

      public static final String CONTEXT_ACKNOWLEDGMENT
      Deprecated.
      RetryContext attribute key for an acknowledgment if the listener is capable of acknowledging.
      See Also:
    • CONTEXT_CONSUMER

      public static final String CONTEXT_CONSUMER
      Deprecated.
      RetryContext attribute key for the consumer if the listener is consumer-aware.
      See Also:
    • CONTEXT_RECORD

      public static final String CONTEXT_RECORD
      Deprecated.
      RetryContext attribute key for the record.
      See Also:
  • Constructor Details

    • RetryingMessageListenerAdapter

      public RetryingMessageListenerAdapter(MessageListener<K,V> messageListener, org.springframework.retry.support.RetryTemplate retryTemplate)
      Deprecated.
      Construct an instance with the provided template and delegate. The exception will be thrown to the container after retries are exhausted.
      Parameters:
      messageListener - the delegate listener.
      retryTemplate - the template.
    • RetryingMessageListenerAdapter

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

      public RetryingMessageListenerAdapter(MessageListener<K,V> messageListener, org.springframework.retry.support.RetryTemplate retryTemplate, @Nullable org.springframework.retry.RecoveryCallback<? extends Object> recoveryCallback, boolean stateful)
      Deprecated.
      Construct an instance with the provided template, callback and delegate. When using stateful retry, the retry context key is a concatenated String topic-partition-offset. A DefaultErrorHandler is required in the listener container because stateful retry will throw the exception to the container for each delivery attempt.
      Parameters:
      messageListener - the delegate listener.
      retryTemplate - the template.
      recoveryCallback - the recovery callback; if null, the exception will be thrown to the container after retries are exhausted.
      stateful - true for stateful retry.
      Since:
      2.1.3
  • Method Details