K - the key type.V - the value type.public class RetryingMessageListenerAdapter<K,V> extends AbstractRetryingMessageListenerAdapter<K,V,MessageListener<K,V>> implements MessageListener<K,V>
MessageListeners.ConsumerSeekAware.ConsumerSeekCallbackCONTEXT_ACKNOWLEDGMENT, CONTEXT_RECORDdelegate, 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<? extends java.lang.Object> 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)
Invoked with data from kafka.
|
getRecoveryCallback, getRetryTemplateonIdleContainer, onPartitionsAssigned, registerSeekCallbackpublic 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<? extends java.lang.Object> 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)
GenericMessageListeneronMessage in interface GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>record - the data to be processed.