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>
- Direct Known Subclasses:
RetryingMessageListenerAdapter
public abstract class AbstractRetryingMessageListenerAdapter<K,V,T> extends AbstractDelegatingMessageListenerAdapter<T>
Base class for retrying message listener adapters.- Author:
- Gary Russell
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.kafka.listener.ConsumerSeekAware
ConsumerSeekAware.ConsumerSeekCallback
-
-
Field Summary
-
Fields inherited from class org.springframework.kafka.listener.adapter.AbstractDelegatingMessageListenerAdapter
delegate, delegateType, logger
-
-
Constructor Summary
Constructors Constructor Description AbstractRetryingMessageListenerAdapter(T delegate, org.springframework.retry.support.RetryTemplate retryTemplate)
Construct an instance with the supplied retry template.AbstractRetryingMessageListenerAdapter(T delegate, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.retry.RecoveryCallback<? extends java.lang.Object> recoveryCallback)
Construct an instance with the supplied template and callback.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.retry.RecoveryCallback<? extends java.lang.Object>
getRecoveryCallback()
org.springframework.retry.support.RetryTemplate
getRetryTemplate()
-
Methods inherited from class org.springframework.kafka.listener.adapter.AbstractDelegatingMessageListenerAdapter
getDelegate, onIdleContainer, onPartitionsAssigned, onPartitionsRevoked, registerSeekCallback
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.kafka.listener.ConsumerSeekAware
unregisterSeekCallback
-
-
-
-
Constructor Detail
-
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, org.springframework.retry.RecoveryCallback<? extends java.lang.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.
-
-