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
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final class 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ThreadLocal<@Nullable org.springframework.core.AttributeAccessor>
     
    static final String
    The KafkaInboundEndpoint.RetryContext attribute key for an acknowledgment if the listener is capable of acknowledging.
    static final String
    The KafkaInboundEndpoint.RetryContext attribute key for the consumer if the listener is consumer-aware.
    static final String
    The KafkaInboundEndpoint.RetryContext attribute key for the record.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    doWithRetry(org.springframework.core.retry.RetryTemplate template, @Nullable org.springframework.integration.core.RecoveryCallback<?> callback, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, @Nullable org.springframework.kafka.support.Acknowledgment acknowledgment, @Nullable org.apache.kafka.clients.consumer.Consumer<?,?> consumer, Runnable runnable)
    Execute the runnable with the retry template and recovery callback.
  • Field Details

  • Method Details

    • doWithRetry

      default void doWithRetry(org.springframework.core.retry.RetryTemplate template, @Nullable org.springframework.integration.core.RecoveryCallback<?> callback, org.apache.kafka.clients.consumer.ConsumerRecord<?,?> record, @Nullable org.springframework.kafka.support.Acknowledgment acknowledgment, @Nullable 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.