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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.kafka.core.KafkaAdmin
org.springframework.kafka.core.DefaultKafkaConsumerFactory<?,
?> org.springframework.kafka.security.jaas.KafkaJaasLoginModuleInitializer
org.springframework.kafka.core.DefaultKafkaProducerFactory<?,
?> 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)
-
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.LoggingProducerListener<Object,Object> kafkaProducerListener() -
kafkaConsumerFactory
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.ConsumerFactory.class) public org.springframework.kafka.core.DefaultKafkaConsumerFactory<?,?> kafkaConsumerFactory(ObjectProvider<DefaultKafkaConsumerFactoryCustomizer> customizers) -
kafkaProducerFactory
@Bean @ConditionalOnMissingBean(org.springframework.kafka.core.ProducerFactory.class) public org.springframework.kafka.core.DefaultKafkaProducerFactory<?,?> 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
-
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)
-