Closed yunheMsft closed 3 weeks ago
Thank you for your feedback. Tagging and routing to the team member best able to assist.
Hi @yunheMsft , For the questions you asked.
if (shouldRetry)
{
var retryAfter = message.HasResponse ? message.Response.Headers.RetryAfter : default;
TimeSpan delay = async ? await GetNextDelayAsync(message, retryAfter).ConfigureAwait(false) : GetNextDelay(message, retryAfter);
if (delay > TimeSpan.Zero)
{
if (async)
{
await WaitAsync(delay, message.CancellationToken).ConfigureAwait(false);
}
else
{
Wait(delay, message.CancellationToken);
}
}
var option = new ArmClientOptions()
{
RetryPolicy = new YourPolicy()
};
var client = new ArmClient(new DefaultAzureCredential(), subscription, option);
Your customized policy should inherit from HttpPipelinePolicy
just like RetryPolicy
Hi @yunheMsft. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text "/unresolve" to remove the "issue-addressed" label and continue the conversation.
Thanks @HarveyLink for the explanation.
Library name and version
Azure.ResourceManager.Dns 1.1.1
Query/Question
I have a process to fetch all Dns records from a zone using GetAllRecordDataAsync().
When iterating through the result AsyncPageable, I see 429 error returned by DNS server side. Based on the logs from ARM, the SDK client initiated 3-4 retries for the call to fetch a particular page. However, the delay between each retry was only 10 seconds. This aligns with the "Retry-After: 10" header returned by DNS service.
My questions:
Environment
No response