Created
September 29, 2020 14:06
-
-
Save kevinhillinger/d3769658066aec4c778398108461e0d1 to your computer and use it in GitHub Desktop.
Cosmos Java SDK Client configuration
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Duration twelveHourTimeout = Duration.ofHours(12); | |
DirectConnectionConfig connectionConfig = new DirectConnectionConfig(); | |
connectionConfig.setIdleConnectionTimeout(twelveHourTimeout); | |
connectionConfig.setIdleEndpointTimeout(twelveHourTimeout); | |
client = new CosmosClientBuilder() | |
.endpoint(AccountSettings.HOST) | |
.key(AccountSettings.MASTER_KEY) | |
.consistencyLevel(ConsistencyLevel.EVENTUAL) | |
.contentResponseOnWriteEnabled(true) | |
.directMode(connectionConfig) | |
.buildClient(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment