Skip to content

Implement resistance and handling of transient faults such as time out, repetition and broken circuit. in your applications

License

Notifications You must be signed in to change notification settings

enmanuellopez02/Evospike.PollyWithRetryAndCircuitBreaker

Repository files navigation

Polly With Retry And Circuit Breaker

Implement resistance and handling of transient faults such as time out, repetition and broken circuit. in your applications

add configuration extension method

public void ConfigureServices(IServiceCollection services)
{
    services.AddHttpClient<ExampleClient>(client =>
    {
        client.BaseAddress = new Uri("https://localhost:5001");
    })
    .AddPollyWithRetryAndCircuitBreaker(services); //CODE HERE
    
    services.AddControllers();
}

WaitAndRetry

Standby time: 5
Retry Attempt: 0s, 2s, 4s, 8s, 16s
OnRetry: has LogWarning

CircuitBreaker

Allowed before: 3
Duration of break: 15s
OnBreak: has LogWarning
OnReset: has LogWarning

All problems presented during the application can be viewed in your log system

About

Implement resistance and handling of transient faults such as time out, repetition and broken circuit. in your applications

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages