workflow-core icon indicating copy to clipboard operation
workflow-core copied to clipboard

Added CosmosClientOptions to UseCosmosDbPersistence method and CosmosClientFactory constructor

Open afroze9 opened this issue 3 years ago • 0 comments

Describe the change Added CosmosClientOptions to UseCosmosDbPersistence method and CosmosClientFactory constructor to pass additional configuration over to the CosmosClient.

Describe your implementation or design Added CosmosClientOptions to UseCosmosDbPersistence method and CosmosClientFactory constructor with a default value of "null" so as not to break existing codebases.

Tests N/A

Breaking change No.

Additional context By default, CosmosClient uses the "Direct" ConnectionMethod. This does not always work. To fix this, I wanted to pass the "ConnectionMethod" option. But looking at other providers "ElasticSearch", I saw that the configuration object for ElasticClient was passed to the DI methods. So, I used a similar approach here.

afroze9 avatar Jul 03 '22 03:07 afroze9