Class KafkaAutoConfiguration
java.lang.Object
org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration
@AutoConfiguration
@ConditionalOnClass(org.springframework.kafka.core.KafkaTemplate.class)
@EnableConfigurationProperties(KafkaProperties.class)
@Import({org.springframework.boot.autoconfigure.kafka.KafkaAnnotationDrivenConfiguration.class,org.springframework.boot.autoconfigure.kafka.KafkaStreamsAnnotationDrivenConfiguration.class})
public class KafkaAutoConfiguration
extends Object
Auto-configuration
for Apache Kafka.- Since:
- 1.5.0
- Author:
- Gary Russell, Stephane Nicoll, EddĂș MelĂ©ndez, Nakul Mishra
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.kafka.core.KafkaAdmin
org.springframework.kafka.core.ConsumerFactory<?,
?> org.springframework.kafka.security.jaas.KafkaJaasLoginModuleInitializer
org.springframework.kafka.core.ProducerFactory<?,
?> org.springframework.kafka.core.KafkaTemplate<?,
?> kafkaTemplate
(org.springframework.kafka.core.ProducerFactory<Object, Object> kafkaProducerFactory, org.springframework.kafka.support.ProducerListener<Object, Object> kafkaProducerListener, ObjectProvider<org.springframework.kafka.support.converter.RecordMessageConverter> messageConverter) org.springframework.kafka.transaction.KafkaTransactionManager<?,
?> kafkaTransactionManager
(org.springframework.kafka.core.ProducerFactory<?, ?> producerFactory)
-
Constructor Details
-
KafkaAutoConfiguration
-
-
Method Details
-
kafkaTemplate
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.KafkaTemplate.class) public org.springframework.kafka.core.KafkaTemplate<?,?> kafkaTemplate(org.springframework.kafka.core.ProducerFactory<Object, Object> kafkaProducerFactory, org.springframework.kafka.support.ProducerListener<Object, Object> kafkaProducerListener, ObjectProvider<org.springframework.kafka.support.converter.RecordMessageConverter> messageConverter) -
kafkaProducerListener
@Bean @ConditionalOnMissingBean(org.springframework.kafka.support.ProducerListener.class) public org.springframework.kafka.support.ProducerListener<Object,Object> kafkaProducerListener() -
kafkaConsumerFactory
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.ConsumerFactory.class) public org.springframework.kafka.core.ConsumerFactory<?,?> kafkaConsumerFactory(ObjectProvider<DefaultKafkaConsumerFactoryCustomizer> customizers) -
kafkaProducerFactory
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.ProducerFactory.class) public org.springframework.kafka.core.ProducerFactory<?,?> kafkaProducerFactory(ObjectProvider<DefaultKafkaProducerFactoryCustomizer> customizers) -
kafkaTransactionManager
@Bean @ConditionalOnProperty(name="spring.kafka.producer.transaction-id-prefix") @ConditionalOnMissingBean public org.springframework.kafka.transaction.KafkaTransactionManager<?,?> kafkaTransactionManager(org.springframework.kafka.core.ProducerFactory<?, ?> producerFactory) -
kafkaJaasInitializer
@Bean @ConditionalOnProperty(name="spring.kafka.jaas.enabled") @ConditionalOnMissingBean public org.springframework.kafka.security.jaas.KafkaJaasLoginModuleInitializer kafkaJaasInitializer() throws IOException- Throws:
IOException
-
kafkaAdmin
-