microsoft/spring-data-cosmosdb

Modify default connection policy with cosmosdb springboot starter

BingjieGao opened this issue · 2 comments

Hi Microsoft Team,
I'm using azure-cosmosdb-spring-boot-starter version 2.3.1, and by default it's using

connectionMode=DIRECT
directModeProtocol [Tcp]

could you help how to make the connectionMode into Gateway? I could see there should be such property could be configured in application.properties file

azure.cosmosdb.connection-policy=

Hi Microsoft Team,
From the source code I got for version 2.3.1 of springboot-starter it seems there is no way to switch to GATEWAY mode but always default set to be DIRECT TCP.

// This is a temp fix as CosmosDbFactory does not support loading ConnectionPolicy bean from context

Is this the right behavioir?

@BingjieGao - This is a spring-boot-starter issue, can you please open the issue here : https://github.com/microsoft/azure-spring-boot