polly Questions

1

Solved

I have the following retry policy which uses Polly.Extensions.Http: var retryPolicy = Policy.Handle<BrokenCircuitException>().OrTransientHttpError().WaitAndRetryAsync ( retryCount: maxRetry...
Telemann asked 27/12, 2018 at 8:35

1

Solved

I am getting the above exception when executing a wrapped policy including: retry, circuit breaker and bulk head. I have the following policies: var sharedBulkhead = Policy.BulkheadAsync( maxPar...
Observable asked 23/12, 2018 at 18:14

1

I'm implementing Polly to retry requests in my C# web app. My sample code is included in this post. The code works as expected but the last parameter passed to CreateFile() (currently hard-coded as...
Bryson asked 20/12, 2018 at 23:49

2

Solved

I need to log retry policy defined via Polly in APS.NET CORE 2.1+. My code is below showing Polly retry polly and using HttpClient. public IServiceProvider ConfigureServices(IServiceCollection s...
Sundowner asked 4/12, 2018 at 1:15

1

Solved

Calling a Dictionary's Add() method using named arguments works in F#. let d = Dictionary<string, obj>() d.Add(key = "five", value = 5) let d2= Dictionary<obj, obj>() d2.Add(key = "fi...
Millard asked 13/7, 2018 at 1:22

1

Solved

I want to apply resiliency strategy using Polly. I am using HttpClientFactory from ASP.NET Core 2.1. I found some guide on Polly GitHub wiki. There are two ways of such policy configuration - using...
Sterlingsterlitamak asked 27/6, 2018 at 10:25

2

Solved

I am trying to convert my existing function to Polly Retry policy public static T Execute<T>(Func<T> getTask) where T : Task { var retryCount = 3; while (retryCount-- > 0) { try...
Trapper asked 12/6, 2018 at 12:46

1

Solved

I'm trying to write a unit test for polly, but it looks like the return is cached. Method PostAsyncWithRetry: using Polly; using System; using System.Diagnostics; using System.Net.Cache; using Sy...
Wheeze asked 17/11, 2017 at 0:52

1

Solved

I have a query, IGetHamburgers, that calls an external API. I've registered the implementation of IGetHamburgers in my DI container as a Singleton. Im using Polly as a Circuitbreaker, if two reques...
Vociferation asked 19/6, 2017 at 19:55

1

Solved

With Polly I'd like to have my policy definition and the execution of that policy in two different statements, as in: // Policy definition var policy = Policy .HandleResult<IRestResponse>(p...
Unrelenting asked 9/6, 2017 at 20:16

1

Solved

I'm using Polly to catch an exception while calling a Pittney Bowes Geocoder service. I'm using a g1client library that throws a MessageProcessingException. I've wrapped the call in a Polly network...
Stroboscope asked 18/5, 2017 at 21:18

1

Solved

I am trying to get the timeout policy to work correctly. I have the following requirements while integrating an api. Create an http request to invoke endpoint1 and pass the transactionID and captu...
Pharyngo asked 14/4, 2017 at 18:8

1

Solved

I'm creating a retry policy the following way: var policy = Policy.Handle<Exception>().WaitAndRetryAsync... How to chail/build a timeout for the retrypolicy above? Policy.TimeoutAsync return...
Harbot asked 4/4, 2017 at 8:22

1

Solved

I'm writing a service which will be connecting to a remote postgres server. I'm looking for a good way to determine which exceptions should be treated as transient (worth retrying), and how to defi...
Isolative asked 15/3, 2017 at 23:3

1

I want to introduce transient fault handling in our .net application. I saw two nu-get packages are available as of now. One is Polly framework and the other one is Microsoft transient fault handli...
Quadratics asked 6/4, 2016 at 9:28

© 2022 - 2024 — McMap. All rights reserved.