@Configuration @AutoConfigureAfter(value=com.azure.spring.cloud.autoconfigure.context.AzureContextAutoConfiguration.class) @ConditionalOnClass(value=com.azure.messaging.eventhubs.EventHubConsumerAsyncClient.class) @ConditionalOnProperty(value="spring.cloud.azure.eventhub.enabled", matchIfMissing=true) @EnableConfigurationProperties(value=AzureEventHubProperties.class) public class AzureEventHubAutoConfiguration extends Object
EventHubOperation| Constructor and Description |
|---|
AzureEventHubAutoConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
EventHubClientFactory |
eventhubClientFactory(EnvironmentProvider environmentProvider,
StorageAccountManager storageAccountManager,
EventHubConnectionStringProvider eventHubConnectionStringProvider,
AzureEventHubProperties properties) |
EventHubConnectionStringProvider |
eventHubConnectionStringProvider(EventHubNamespaceManager namespaceManager,
AzureEventHubProperties properties)
Create a
EventHubConnectionStringProvider bean. |
EventHubNamespaceManager |
eventHubNamespaceManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager,
AzureProperties azureProperties) |
EventHubOperation |
eventHubOperation(EventHubClientFactory clientFactory) |
StorageAccountManager |
storageAccountManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager,
AzureProperties azureProperties) |
@Bean @ConditionalOnMissingBean @ConditionalOnBean(value=com.azure.resourcemanager.AzureResourceManager.class) public EventHubNamespaceManager eventHubNamespaceManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)
@Bean @ConditionalOnMissingBean @ConditionalOnBean(value=com.azure.resourcemanager.AzureResourceManager.class) public StorageAccountManager storageAccountManager(com.azure.resourcemanager.AzureResourceManager azureResourceManager, AzureProperties azureProperties)
@Bean @ConditionalOnMissingBean public EventHubConnectionStringProvider eventHubConnectionStringProvider(@Autowired(required=false) EventHubNamespaceManager namespaceManager, AzureEventHubProperties properties)
EventHubConnectionStringProvider bean. 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.namespaceManager - The resource manager for Event Hubs namespaces.properties - The Event Hubs properties.EventHubConnectionStringProvider bean.IllegalArgumentException - If connection string is empty.@Bean @ConditionalOnMissingBean public EventHubClientFactory eventhubClientFactory(@Autowired(required=false) EnvironmentProvider environmentProvider, @Autowired(required=false) StorageAccountManager storageAccountManager, EventHubConnectionStringProvider eventHubConnectionStringProvider, AzureEventHubProperties properties)
@Bean @ConditionalOnMissingBean public EventHubOperation eventHubOperation(EventHubClientFactory clientFactory)
Copyright © 2021 Microsoft Corporation. All rights reserved.