Interface KafkaListenerContainerCustomizer

All Superinterfaces:
org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>>

public interface KafkaListenerContainerCustomizer extends org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>>
Extension of ListenerContainerCustomizer specific to Kafka binder. This interface allows for customization of Kafka listener containers with access to Kafka-specific extended consumer properties.
Since:
4.2.0
Author:
Soby Chacko
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    configure(org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?> container, String destinationName, String group)
    No-op override of ListenerContainerCustomizer.configure(Object, String, String).
    void
    configure(org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?> container, String destinationName, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties)
    Configure the Kafka listener container with access to extended consumer properties.
  • Method Details

    • configure

      default void configure(org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?> container, String destinationName, String group)
      No-op override of ListenerContainerCustomizer.configure(Object, String, String). Implementations should override configure(AbstractMessageListenerContainer, String, String, ExtendedConsumerProperties) instead, which is the method invoked by the Kafka binder.
      Specified by:
      configure in interface org.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>>
      Parameters:
      container - the Kafka message listener container to configure
      destinationName - the name of the destination (topic) that this listener container is associated with
      group - the consumer group name
    • configure

      void configure(org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?> container, String destinationName, String group, org.springframework.cloud.stream.binder.ExtendedConsumerProperties<org.springframework.cloud.stream.binder.kafka.properties.KafkaConsumerProperties> extendedConsumerProperties)
      Configure the Kafka listener container with access to extended consumer properties.
      Parameters:
      container - the Kafka message listener container to configure
      destinationName - the name of the destination (topic) that this listener container is associated with
      group - the consumer group name
      extendedConsumerProperties - the extended consumer properties specific to Kafka