Class AzureEventHubsKafkaAutoConfiguration


  • @Configuration(proxyBeanMethods=false)
    @ConditionalOnClass(org.springframework.kafka.core.KafkaTemplate.class)
    @ConditionalOnProperty(value="spring.cloud.azure.eventhubs.kafka.enabled",
                           havingValue="true",
                           matchIfMissing=true)
    @AutoConfigureAfter({AzureEventHubsAutoConfiguration.class,AzureEventHubsResourceManagerAutoConfiguration.class})
    public class AzureEventHubsKafkaAutoConfiguration
    extends Object
    Auto-configuration for Azure Event Hubs Kafka support.
    Since:
    4.0.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.boot.autoconfigure.kafka.KafkaProperties azureKafkaProperties​(com.azure.spring.cloud.core.provider.connectionstring.ServiceConnectionStringProvider<com.azure.spring.cloud.core.service.AzureServiceType.EventHubs> connectionStringProvider)
      The Azure KafkaProperties instance will be created if an Azure Event Hubs connection string is provided and the Kafka dependency is detected from the classpath.
      com.azure.spring.cloud.core.provider.connectionstring.StaticConnectionStringProvider<com.azure.spring.cloud.core.service.AzureServiceType.EventHubs> eventHubsKafkaConnectionString​(org.springframework.core.env.Environment environment)
      The static connection string provider to provide the connection string for an Event Hubs instance.
    • Constructor Detail

      • AzureEventHubsKafkaAutoConfiguration

        public AzureEventHubsKafkaAutoConfiguration()
    • Method Detail

      • eventHubsKafkaConnectionString

        @Bean
        @ConditionalOnProperty("spring.cloud.azure.eventhubs.connection-string")
        @ConditionalOnMissingBean(value=com.azure.spring.cloud.core.service.AzureServiceType.EventHubs.class,
                                  parameterizedContainer=com.azure.spring.cloud.core.provider.connectionstring.ServiceConnectionStringProvider.class)
        public com.azure.spring.cloud.core.provider.connectionstring.StaticConnectionStringProvider<com.azure.spring.cloud.core.service.AzureServiceType.EventHubs> eventHubsKafkaConnectionString​(org.springframework.core.env.Environment environment)
        The static connection string provider to provide the connection string for an Event Hubs instance.
        Parameters:
        environment - the Spring environment.
        Returns:
        the connection string provider.
      • azureKafkaProperties

        @Primary
        @Bean
        @ConditionalOnBean(value=com.azure.spring.cloud.core.service.AzureServiceType.EventHubs.class,
                           parameterizedContainer=com.azure.spring.cloud.core.provider.connectionstring.ServiceConnectionStringProvider.class)
        public org.springframework.boot.autoconfigure.kafka.KafkaProperties azureKafkaProperties​(com.azure.spring.cloud.core.provider.connectionstring.ServiceConnectionStringProvider<com.azure.spring.cloud.core.service.AzureServiceType.EventHubs> connectionStringProvider)
        The Azure KafkaProperties instance will be created if an Azure Event Hubs connection string is provided and the Kafka dependency is detected from the classpath.
        Parameters:
        connectionStringProvider - the Azure Event Hubs connection string provider.
        Returns:
        the KafkaProperties with an Azure Event Hubs connection information.