polly Questions

2

I'm trying to retry a failed operation 3 times. I'm using Polly for a retry operation. I want to get the exception in case the retry operation fails and retry again 2 times and so on. return await ...
Stricture asked 23/12, 2019 at 13:29

4

Solved

Currently I have this request: await url .SetQueryParams(queryString) .SetClaimsToken() .GetJsonAsync<T>() I'd like to start using Polly (https://github.com/App-vNext/Polly) now to hand...
Tallbot asked 22/11, 2016 at 15:31

2

Solved

I'm currently using Polly and Flurl together, but I have a common retry policy that I have to add to every request. I notice that Polly allows you to set a default using AddPolicyHandler(...) but t...
Trommel asked 11/9, 2018 at 9:2

3

I have a policy that looks like this var retryPolicy = Policy .Handle<HttpRequestException>() .OrResult<HttpResponseMessage>(resp => resp.StatusCode == HttpStatusCode.Unauthorized)...
Sarver asked 21/1, 2020 at 2:20

3

I'm try setting up a IHttpClientFactory, and i'd like to know how to send it parameters when it is created, those parameters i need to assign to retry policy. I'm using .Net Core 2.2 and Microsoft....
Cracker asked 2/4, 2019 at 18:25

2

Solved

I recently discovered the .net library Polly . From the GitHub page.. Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, C...
Absorbing asked 21/1, 2018 at 6:35

3

Solved

I am currently using Polly to limit the number of requests I send. This is the policy I currently have: private AsyncPolicyWrap<HttpResponseMessage> DefineAndRetrieveResiliencyStrategy() { H...
Whoop asked 25/2, 2019 at 16:14

4

Solved

I'm working with a very flaky API. Sometimes I get 500 Server Error with Timeout, some other time I also get 500 Server Error because I gave it input that it can't handle SqlDateTime overflow. Mus...
Twoply asked 13/6, 2018 at 11:23

2

Solved

I have a couple of questions around similar concern: I'm making a call to EmailServer and using Polly Policy to WaitAndRetry. But I would like the Retry to happen only for specific timeouts: 5xx an...
Inhere asked 3/4, 2020 at 19:19

3

I'm recently learning and using Polly to add resilience to my code, especially for the timeout and retry policies. However, I don't know how to unit test the code with polly. To be more specific, I...
Fornication asked 2/4, 2019 at 20:2

4

Solved

I'm making calls to an external API and want to deal with the event that a call returns an Unauthorized HttpResponseMessage. When this happens I want to refresh the access token and make the call a...
Baskin asked 28/1, 2017 at 13:0

2

I am developing an integration solution that accesses a rate limited API. I am performing a variety of CRUD operations on the API using multiple HTTP verbs on different endpoints (on the same serve...
Came asked 13/9, 2022 at 14:12

1

Solved

My service definition: var host = new HostBuilder().ConfigureServices(services => { services .AddHttpClient<Downloader>() .AddPolicyHandler((services, request) => HttpPolicyExtensio...
Malnourished asked 13/9, 2022 at 17:56

2

Solved

I have an application where we communicate with hundreds of HTTPs endpoints. The application is a proxy of sorts. When testing with polly, I've noticed that if one endpoint, say api.endpoint1.com f...
Etesian asked 17/10, 2019 at 17:51

3

I am using Polly library for transient fault handling. For synchronous operations Polly circuit breaker policy works fine but when I created its async version it does not retries the execution. Kin...
Grout asked 4/4, 2016 at 9:17

1

Solved

Or: How to log from a static method. From https://github.com/App-vNext/Polly you have examples like this one where a logger is magically available: Policy .Timeout(30, onTimeout: (context, timespa...
Oriental asked 23/10, 2018 at 9:50

2

Solved

How to execute multiple policies (or combine them into a single one)? For example I have: var policy1 = Policy.Handle<DivideByZeroException>().WaitAndRetry(5)); var policy2 = Policy.Handle&l...
Armadillo asked 7/2, 2017 at 15:25

1

Solved

We're using the Dropbox API wrapped in Polly to handle retries. We have it set up as an exponential back-off, like explained here. The issue we have is that we make plenty of concurrent calls. When...
Furrier asked 18/7, 2022 at 15:0

2

I'm trying to get my head around Polly rate-limit policy. public class RateLimiter { private readonly AsyncRateLimitPolicy _throttlingPolicy; private readonly Action<string> _rateLimi...
Inez asked 6/7, 2022 at 22:11

4

I have an application that makes a request for an authenticated service, where it is necessary to pass the access_token. My idea is to use Polly to retry if the access_token is expired. I'm using R...
Boozy asked 18/8, 2020 at 1:36

2

I'm trying to use Polly as retry policy handler for grpc in my .net core 6 project. I noticed that the retryFunc is never invoked. I started from this project gRPC & ASP.NET Core 3.1: Resilienc...
Sworn asked 5/5, 2022 at 11:54

2

I'm trying to set up Polly in .Net Core 3.1 (Azure Functions v3). I want to create a Policy in the Startup class which I can inject into functions. The behaviour that I'm looking for is: It sh...
Foray asked 15/6, 2020 at 5:21

2

Solved

I'm using Polly in very basic scenario to do exponential backoff if an HTTP call fails: protected override async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationT...
Umpire asked 26/6, 2019 at 9:15

1

Solved

During startup I basically add an HttpClient like this: services.AddHttpClient<IHttpClient, MyHttpClient>().AddPolicyHandler(GetRetryPolicy()); public IAsyncPolicy<HttpResponseMessage>...
Armandoarmature asked 30/11, 2021 at 16:9

1

Solved

I've created a retry policy on my HttpClient in the Startup.ConfigureServices method. Note also that by default, asp.net core 2.1 logs 4 [Information] lines for each call made by the HttpClient whi...
Ransell asked 28/10, 2021 at 6:20

© 2022 - 2024 — McMap. All rights reserved.