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 TypeMethodDescriptiondefault voidconfigure(org.springframework.kafka.listener.AbstractMessageListenerContainer<?, ?> container, String destinationName, String group) No-op override ofListenerContainerCustomizer.configure(Object, String, String).voidconfigure(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 ofListenerContainerCustomizer.configure(Object, String, String). Implementations should overrideconfigure(AbstractMessageListenerContainer, String, String, ExtendedConsumerProperties)instead, which is the method invoked by the Kafka binder.- Specified by:
configurein interfaceorg.springframework.cloud.stream.config.ListenerContainerCustomizer<org.springframework.kafka.listener.AbstractMessageListenerContainer<?,?>> - Parameters:
container- the Kafka message listener container to configuredestinationName- the name of the destination (topic) that this listener container is associated withgroup- 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 configuredestinationName- the name of the destination (topic) that this listener container is associated withgroup- the consumer group nameextendedConsumerProperties- the extended consumer properties specific to Kafka
-