retryOptions.setMaxRetryAttemptsOnThrottledRequests(this.getIntProperty( "azurecosmos.maxRetryAttemptsOnThrottledRequests", retryOptions.getMaxRetryAttemptsOnThrottledRequests()));
/** * Sets the maximum number of retries in the case where the request fails * due to a throttle error. * <p> * When a client is sending request faster than the request rate limit imposed by the service, * the service will return HttpStatusCode 429 (Too Many Request) to throttle the client. The current * implementation in the SDK will then wait for the amount of time the service tells it to wait and * retry after the time has elapsed. * <p> * The default value is 9. This means in the case where the request is throttled, * the same request will be issued for a maximum of 10 times to the server before * an error is returned to the application. * <p> * This property is deprecated. Please use * connectionPolicy.getRetryOptions().setMaxRetryAttemptsOnThrottledRequests() for equivalent * functionality. * * @param maxRetryOnThrottledAttempts the max number of retry attempts on failed requests. */ @Deprecated public void setMaxRetryOnThrottledAttempts(Integer maxRetryOnThrottledAttempts) { int maxAttempts = 0; if (maxRetryOnThrottledAttempts != null) { maxAttempts = maxRetryOnThrottledAttempts; } this.retryOptions.setMaxRetryAttemptsOnThrottledRequests(maxAttempts); }