Class AzureEventHubAutoConfiguration
- java.lang.Object
-
- com.azure.spring.cloud.autoconfigure.eventhub.AzureEventHubAutoConfiguration
-
@Configuration @AutoConfigureAfter(com.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration.class) @ConditionalOnClass(com.azure.messaging.eventhubs.EventHubConsumerAsyncClient.class) @ConditionalOnProperty(value="spring.cloud.azure.eventhub.enabled", matchIfMissing=true) @EnableConfigurationProperties(AzureEventHubProperties.class) public class AzureEventHubAutoConfiguration extends Object
An auto-configuration for Event Hub, which providesEventHubOperation- Author:
- Warren Zhu
-
-
Constructor Summary
Constructors Constructor Description AzureEventHubAutoConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventHubClientFactoryeventhubClientFactory(EnvironmentProvider environmentProvider, StorageAccountManager storageAccountManager, EventHubConnectionStringProvider eventHubConnectionStringProvider, AzureEventHubProperties properties)EventHubConnectionStringProvidereventHubConnectionStringProvider(EventHubNamespaceManager namespaceManager, AzureEventHubProperties properties)Create aEventHubConnectionStringProviderbean.EventHubNamespaceManagereventHubNamespaceManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)EventHubOperationeventHubOperation(EventHubClientFactory clientFactory)StorageAccountManagerstorageAccountManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)
-
-
-
Method Detail
-
eventHubNamespaceManager
@Bean @ConditionalOnMissingBean @ConditionalOnBean(com.azure.resourcemanager.AzureResourceManager.class) public EventHubNamespaceManager eventHubNamespaceManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)
-
storageAccountManager
@Bean @ConditionalOnMissingBean @ConditionalOnBean(com.azure.resourcemanager.AzureResourceManager.class) @ConditionalOnProperty("spring.cloud.azure.eventhub.checkpoint-storage-account") public StorageAccountManager storageAccountManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)
-
eventHubConnectionStringProvider
@Bean @ConditionalOnMissingBean public EventHubConnectionStringProvider eventHubConnectionStringProvider(@Autowired(required=false) EventHubNamespaceManager namespaceManager, AzureEventHubProperties properties)
Create aEventHubConnectionStringProviderbean. The bean will hold the connection string to the eventhub. If connection-string property is configured in the property files, it will use it. Otherwise, it will try to construct the connection-string using the resource manager.- Parameters:
namespaceManager- The resource manager for Event Hubs namespaces.properties- The Event Hubs properties.- Returns:
- The
EventHubConnectionStringProviderbean. - Throws:
IllegalArgumentException- If connection string is empty.
-
eventhubClientFactory
@Bean @ConditionalOnMissingBean public EventHubClientFactory eventhubClientFactory(@Autowired(required=false) EnvironmentProvider environmentProvider, @Autowired(required=false) StorageAccountManager storageAccountManager, EventHubConnectionStringProvider eventHubConnectionStringProvider, AzureEventHubProperties properties)
-
eventHubOperation
@Bean @ConditionalOnMissingBean public EventHubOperation eventHubOperation(EventHubClientFactory clientFactory)
-
-