Implementing the retry pattern in c sharp using Polly

This post is the third and final installment on the retry pattern following on from implementing a simple retry pattern in c# and the retry pattern for async tasks. In the last two posts we created a retry helper class to allow us to add retry logic to applications without cluttering important application logic with retry code. Now we will solve the same problem using a popular OSS library. Polly is an open source framework for that “allows developers to express transient exception and fault handling policies such as Retry, Retry Forever, Wait and Retry, or Circuit Breaker in a fluent manner”....

December 29, 2016 · 3 min · 611 words · Alastair Crabtree

Implementing a simple retry pattern in c#

Everything is unstable. You cannot assume that every external service call will succeed on first attempt - the load balancer might be removing a failing host, the database might be being patched, the Ops person might have tripped on the network cable and quickly plugged it back in hoping the boss didn’t notice. If you make an outbound call you probably need an easy way to retry a couple of times before giving up and raising an exception....

December 1, 2016 · 3 min · 629 words · Alastair Crabtree