Mahantesh Kendhuli
Mahantesh Kendhuli
/// /// Retry these codes for 3 times for every second /// private static readonly List _set1 = [ HttpStatusCode.Unauthorized //401 ]; /// /// Policy to retry for 3 times...
I am sharing the updated code(corrected with logs)
using Polly.CircuitBreaker; using Polly.Contrib.WaitAndRetry; using Polly.Retry; using Polly; using System.Net; namespace ClientAPI.TestHarness.Modules { public class WaitAndRetryPolicies { ### Retry1 /// /// Retry these codes for 3 times for every second...
using Polly.CircuitBreaker; using Polly; using System.Net; namespace ClientAPI.TestHarness.Modules { public class CircuitBreakerPolicy { ### Circuit breaker /// /// Retry these codes for 3 times for every second /// private static...
Hosting starting info: Microsoft.Hosting.Lifetime[14] Now listening on: http://localhost:5025 info: Microsoft.Hosting.Lifetime[0] Application started. Press Ctrl+C to shut down. info: Microsoft.Hosting.Lifetime[0] Hosting environment: Development dbug: Microsoft.Extensions.Hosting.Internal.Host[2] Hosting started dbug: Microsoft.WebTools.BrowserLink.Net.BrowserLinkMiddleware[1] Response markup...
I have written some comments(mycomment-) in the log. Can you please review it.
This is how I applied the policies at startup.cs WaitAndRetryPolicies waitAndRetryPolicies = new WaitAndRetryPolicies(); CircuitBreakerPolicy circuitBreakerPolicy = new CircuitBreakerPolicy(); var retry1 = waitAndRetryPolicies.WaitAndRetrySet1Async(); var retry2 = waitAndRetryPolicies.WaitAndRetrySet2Async(); var retry3 =...
This is my problem statement Define policies for the following use cases 1)Status code 401 retry for 3 times for every second 2)Status code 423 retry for 3 times exponentially...
Can you please correct me if anything is wrong in my code or please point me to right solution to achieve the same. Thank you in advance.
Thank you so much for your inputs. I commented out **//.Or()** from all my retry policies and defined a new policy to handle the BrokenCircuitException as below public AsyncRetryPolicy NoWaitAndRetryAsync()...