Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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

  1. Network Failures: Max retries - 120
  2. GoneExceptions
  3. 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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
364 views
Welcome To Ask or Share your Answers For Others

1 Answer

Java SDK about request timeout and retry options:

enter image description here enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...