Interface KafkaInboundEndpoint
- All Known Implementing Classes:
 KafkaInboundGateway,KafkaMessageDrivenChannelAdapter
public interface KafkaInboundEndpoint
Implementations of this interface will generally support a retry template for retrying
 incoming deliveries and this supports adding common attributes to the retry context.
- Since:
 - 6.0
 - Author:
 - Gary Russell
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ThreadLocal<AttributeAccessor> static final StringRetryContextattribute key for an acknowledgment if the listener is capable of acknowledging.static final StringRetryContextattribute key for the consumer if the listener is consumer-aware.static final StringRetryContextattribute key for the record. - 
Method Summary
Modifier and TypeMethodDescriptiondefault voiddoWithRetry(org.springframework.retry.support.RetryTemplate template, org.springframework.retry.RecoveryCallback<?> callback, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, org.springframework.kafka.support.Acknowledgment acknowledgment, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, Runnable runnable) Execute the runnable with the retry template and recovery callback. 
- 
Field Details
- 
CONTEXT_ACKNOWLEDGMENT
RetryContextattribute key for an acknowledgment if the listener is capable of acknowledging.- See Also:
 
 - 
CONTEXT_CONSUMER
RetryContextattribute key for the consumer if the listener is consumer-aware.- See Also:
 
 - 
CONTEXT_RECORD
 - 
ATTRIBUTES_HOLDER
 
 - 
 - 
Method Details
- 
doWithRetry
default void doWithRetry(org.springframework.retry.support.RetryTemplate template, org.springframework.retry.RecoveryCallback<?> callback, org.apache.kafka.clients.consumer.ConsumerRecord<?, ?> record, org.springframework.kafka.support.Acknowledgment acknowledgment, org.apache.kafka.clients.consumer.Consumer<?, ?> consumer, Runnable runnable) Execute the runnable with the retry template and recovery callback.- Parameters:
 template- the template.callback- the callback.record- the record (or records).acknowledgment- the acknowledgment.consumer- the consumer.runnable- the runnable.
 
 -