Last active
December 19, 2017 20:29
-
-
Save philgebhardt/7bbc317490a10e912935bc28a99f2619 to your computer and use it in GitHub Desktop.
This DynamoDB client is configured for batch processing
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
/** | |
* This dynamodb configuration is for batch processing, taking up to 30 seconds to finish communicating | |
* with the database | |
*/ | |
public final AmazonDynamoDB getDynamoDBForBatchProcessing() { | |
return AmazonDynamoDBClientBuilder.standard() | |
.withRegion(this.regions) | |
.withClientConfiguration(new ClientConfiguration() | |
.withConnectionTimeout(500) | |
.withClientExecutionTimeout(30000) | |
// Allow as many retries as possible until the client execution timeout expires | |
.withMaxErrorRetry(Integer.MAX_VALUE)) | |
.build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment