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, Tomaz Fernandes, Moritz Halbritter, Andy Wilkinson, Phillip Webb, Andy Wilkinson, Scott Frederick
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.kafka.core.KafkaAdmin
kafkaAdmin
(KafkaConnectionDetails connectionDetails, ObjectProvider<SslBundles> sslBundles) org.springframework.kafka.core.DefaultKafkaConsumerFactory<?,
?> kafkaConsumerFactory
(KafkaConnectionDetails connectionDetails, ObjectProvider<DefaultKafkaConsumerFactoryCustomizer> customizers, ObjectProvider<SslBundles> sslBundles) org.springframework.kafka.security.jaas.KafkaJaasLoginModuleInitializer
org.springframework.kafka.core.DefaultKafkaProducerFactory<?,
?> kafkaProducerFactory
(KafkaConnectionDetails connectionDetails, ObjectProvider<DefaultKafkaProducerFactoryCustomizer> customizers, ObjectProvider<SslBundles> sslBundles) org.springframework.kafka.retrytopic.RetryTopicConfiguration
kafkaRetryTopicConfiguration
(org.springframework.kafka.core.KafkaTemplate<?, ?> kafkaTemplate) 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)
-
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.LoggingProducerListener<Object,Object> kafkaProducerListener() -
kafkaConsumerFactory
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.ConsumerFactory.class) public org.springframework.kafka.core.DefaultKafkaConsumerFactory<?,?> kafkaConsumerFactory(KafkaConnectionDetails connectionDetails, ObjectProvider<DefaultKafkaConsumerFactoryCustomizer> customizers, ObjectProvider<SslBundles> sslBundles) -
kafkaProducerFactory
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.ProducerFactory.class) public org.springframework.kafka.core.DefaultKafkaProducerFactory<?,?> kafkaProducerFactory(KafkaConnectionDetails connectionDetails, ObjectProvider<DefaultKafkaProducerFactoryCustomizer> customizers, ObjectProvider<SslBundles> sslBundles) -
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
@Bean @ConditionalOnMissingBean public org.springframework.kafka.core.KafkaAdmin kafkaAdmin(KafkaConnectionDetails connectionDetails, ObjectProvider<SslBundles> sslBundles) -
kafkaRetryTopicConfiguration
@Bean @ConditionalOnProperty(name="spring.kafka.retry.topic.enabled") @ConditionalOnSingleCandidate(org.springframework.kafka.core.KafkaTemplate.class) public org.springframework.kafka.retrytopic.RetryTopicConfiguration kafkaRetryTopicConfiguration(org.springframework.kafka.core.KafkaTemplate<?, ?> kafkaTemplate)
-