@Configuration @ConditionalOnClass(value=KafkaPublisher.class) @EnableConfigurationProperties(value=KafkaProperties.class) public class KafkaAutoConfiguration extends Object
Auto-configuration
for Apache Kafka.Constructor and Description |
---|
KafkaAutoConfiguration(KafkaProperties properties) |
Modifier and Type | Method and Description |
---|---|
ConsumerFactory<String,byte[]> |
kafkaConsumerFactory() |
Fetcher |
kafkaFetcher(ConsumerFactory<String,byte[]> consumerFactory,
KafkaMessageConverter<String,byte[]> messageConverter) |
KafkaMessageConverter<String,byte[]> |
kafkaMessageConverter(Serializer eventSerializer) |
KafkaMessageSource |
kafkaMessageSource(Fetcher fetcher) |
KafkaPublisher<String,byte[]> |
kafkaPublisher(ProducerFactory<String,byte[]> producerFactory,
EventBus eventBus,
KafkaMessageConverter<String,byte[]> messageConverter,
AxonConfiguration configuration) |
ProducerFactory<String,byte[]> |
producerFactory() |
public KafkaAutoConfiguration(KafkaProperties properties)
@ConditionalOnMissingBean @ConditionalOnProperty(value="axon.kafka.producer.transaction-id-prefix") @Bean public ProducerFactory<String,byte[]> producerFactory()
@ConditionalOnMissingBean @Bean @ConditionalOnProperty(value="axon.kafka.consumer.group-id") public ConsumerFactory<String,byte[]> kafkaConsumerFactory()
@ConditionalOnMissingBean @Bean(initMethod="start", destroyMethod="shutDown") @ConditionalOnBean(value=ProducerFactory.class) public KafkaPublisher<String,byte[]> kafkaPublisher(ProducerFactory<String,byte[]> producerFactory, EventBus eventBus, KafkaMessageConverter<String,byte[]> messageConverter, AxonConfiguration configuration)
@ConditionalOnMissingBean @Bean(destroyMethod="shutdown") @ConditionalOnBean(value={ConsumerFactory.class,KafkaMessageConverter.class}) public Fetcher kafkaFetcher(ConsumerFactory<String,byte[]> consumerFactory, KafkaMessageConverter<String,byte[]> messageConverter)
@ConditionalOnMissingBean @Bean @ConditionalOnBean(value=ConsumerFactory.class) public KafkaMessageSource kafkaMessageSource(Fetcher fetcher)
@ConditionalOnMissingBean @Bean public KafkaMessageConverter<String,byte[]> kafkaMessageConverter(@Qualifier(value="eventSerializer") Serializer eventSerializer)
Copyright © 2010–2018. All rights reserved.