I am using Azure Cosmos SDK Version 4.10.0. I would like to know is there a way to override the retry values for Exception other than throttling Exception. I know that throttled requests (429) can be override using ThrottlingRetryOptions.
Some other exceptions which have retries are
- Network Failures: Max retries - 120
- GoneExceptions
- PartitionIsMigratingException
Default values:
Backoff Constants
private final static int DEFAULT_WAIT_TIME_IN_SECONDS = 30;
//Note: Wait time in seconds after which the exception is logged with following warning: ""Received {} after backoff/retry. Will fail the request.{exception}". No further retries are attempted after this duration.
private final static int MAXIMUM_BACKOFF_TIME_IN_SECONDS = 15;
//Note: Maximum time in seconds a backoff occurs
private final static int INITIAL_BACKOFF_TIME = 1; // in seconds
private final static int BACK_OFF_MULTIPLIER = 2;
We don't want our client to wait for 30 seconds due to a network issue and return a failure say after 5 seconds.
question from:https://stackoverflow.com/questions/65601174/azure-cosmos-java-sdk-overriding-default-retry-values