by firstname.lastname@example.org, 2020-08-19T17:47:22.996Z
Hi All! Today we'll see an interesting technique to add retry policies to MediatR. It can actually be used also for other types of policies (fallback, circuit breaker, and so on), but we'll focusing on retries to keep things simple.
As you might have guessed, this "magic trick" involves the use of the Decorator Pattern. We talked already about it in another article so I'm not going to spend time on it. Let's jump into the code!