K
- the key type.V
- the value type.public class RetryingMessageListenerAdapter<K,V> extends AbstractRetryingMessageListenerAdapter<K,V,MessageListener<K,V>> implements MessageListener<K,V>
MessageListener
s.ConsumerSeekAware.ConsumerSeekCallback
delegate, 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)
Invoked with data from kafka.
|
getRecoveryCallback, getRetryTemplate
onIdleContainer, onPartitionsAssigned, registerSeekCallback
public 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)
GenericMessageListener
onMessage
in interface GenericMessageListener<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>
record
- the data to be processed.