Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Spring Cloud Azure 4.0 EventHubs binder processor configuration #24888

Conversation

saragluna
Copy link
Member

@saragluna saragluna commented Oct 19, 2021

The AzureBlobCheckpointStoreConfiguration was only conditional on property container-name, but we need account-name + container-name together to locate a blob container. So in this PR the AzureBlobCheckpointStoreConfiguration will be conditional on these two properties.

In the early version, a BlobServiceClientBuilderFactory was created inside the creation of bean BlobCheckpointStore, which will make the BlobServiceClientBuilderFactory inaccessible for some instrumentation. So in this PR, a bean of BlobServiceClientBuilderFactory will be created.

Also added some tests for the BlobServiceClientBuilderFactory and to make sure it could work with AzureStorageBlobAutoConfiguration.
Also remove the optional scope for <artifactId>azure-messaging-eventhubs-checkpointstore-blob</artifactId> in spring-cloud-azure-stream-binder-eventhubs.

@saragluna
Copy link
Member Author

/azp run java - spring - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

.build()
.buildAsyncClient()
.getBlobContainerAsyncClient(checkpointStoreProperties.getContainerName());

if (Boolean.FALSE.equals(blobContainerAsyncClient.exists().block(Duration.ofSeconds(3)))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcode timeout?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and this has to be done at the initializing time in a sync way?
since this will slow up the spring boot application start up time and it is already pretty slow

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add two more configuration entries here, to let users customize whether to create the container automatically and the timeout.

@saragluna
Copy link
Member Author

/azp run java - spring - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@stliu stliu merged commit 2a8f662 into Azure:feature/azure-spring-cloud-4.0 Oct 20, 2021
@saragluna saragluna deleted the xiada/fix/eventhub-binder-processor-configuration branch March 17, 2022 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
azure-spring All azure-spring related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants