K - the key type.V - the value type.public class RetryingMessageListenerAdapter<K,V> extends AbstractRetryingMessageListenerAdapter<K,V> implements MessageListener<K,V>
MessageListeners.logger| Constructor and Description |
|---|
RetryingMessageListenerAdapter(MessageListener<K,V> messageListener,
org.springframework.retry.support.RetryTemplate retryTemplate)
Construct an instance with the provided template and delegate.
|
RetryingMessageListenerAdapter(MessageListener<K,V> messageListener,
org.springframework.retry.support.RetryTemplate retryTemplate,
org.springframework.retry.RecoveryCallback<java.lang.Void> recoveryCallback)
Construct an instance with the provided template, callback and delegate.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onMessage(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
Executes when a
ConsumerRecord is received. |
getRecoveryCallback, getRetryTemplatepublic RetryingMessageListenerAdapter(MessageListener<K,V> messageListener, org.springframework.retry.support.RetryTemplate retryTemplate)
messageListener - the delegate listener.retryTemplate - the template.public RetryingMessageListenerAdapter(MessageListener<K,V> messageListener, org.springframework.retry.support.RetryTemplate retryTemplate, org.springframework.retry.RecoveryCallback<java.lang.Void> recoveryCallback)
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.public void onMessage(org.apache.kafka.clients.consumer.ConsumerRecord<K,V> record)
MessageListenerConsumerRecord is received.onMessage in interface MessageListener<K,V>record - the ConsumerRecord to be processed.