This is an oversimplified sample application which demonstrates the basics of the Polly.
It shows you how can you easily setup:
- Timeout:
GetTimeoutPolicy
(Ref) - Retry:
GetRetryPolicy
(Ref) - CircuitBreaker:
GetCircuitBreakerPolicy
(Ref) - PolicyWrap:
Policy.WrapAsync
(Ref)
It does that in an asynchronous fashion.
The program simulates a faulty remote network call (async non-blocking I/O) in the SampleCallAsync
(Ref)
It lists a bunch of commonly used resilient patterns.
It does that in the following way:
- It categories it
- It makes clear how does it relate to similar terms or concepts
- It describes how does it work
- In some cases it lists the tweaking options (parameters)
- It brings some examples where it is being used and how