Quantcast
Channel: Active questions tagged retry-logic - Stack Overflow
Browsing all 950 articles
Browse latest View live
↧

Retry strategy with exponential timeout

I use Polly to retry HTTP Requests. The following code works fine:IAsyncPolicy<HttpResponseMessage> waitTimeout = Policy.TimeoutAsync<HttpResponseMessage>(TimeSpan.FromSeconds(5));// Retry...

View Article


Cypress: How to retry entire test suite?

GoalBe able to perform multiple retries of an entire test suite until all tests succeed.Instead of configuring retries allowed for every test within a test suite, as defined by Configure Test Retries:...

View Article


Unit testing a stream being retried

I've written a stream that calls the foobarMethod, potentially triggering the mono of a SocketTimeoutException. I want this method to retry 2 times. Manually, this code works but in the junit test I...

View Article

How to configure the Rate Limiter of the StandardResilienceHandler

I'm writing an application that connects to another HTTP service. I want to rate-limit my outgoing requests to that external service.Ideally, I want to use the standard resilience handler as documented...

View Article

How to do retries in Kotlin, with timeout durations and maximum retry...

The codebase I'm working with already has a way of defining retry limits through annotations, e.g.@Retry( retryInterval = 60)fun doSomething(args: ...)However the retry parameters need to be specified...

View Article


Should I retry in the middle of a chain communication of micro services

Let us say that I have services A, B, C, D. For a request, the system needs to do a long call chain to calculate the result, the chain is A -> B -> C -> D. The request is critical and...

View Article

Python tenacity library retry what does after & retry_error_callback do

Using retry. What does after and retry_error_callback specifically do?@retry( stop=stop_after_attempt(3), wait=wait_exponential(multiplier=3, max=3) + wait_random(0, retry_wait_jitter),...

View Article

What's alternative of HttpPolicyExtensions.HandleTransientHttpError in new...

I am trying to upgrade Polly to v8, re-writing policies to utilize new ResiliencePipiline. At couple of places I am using HttpPolicyExtensions.HandleTransientHttpError() HttpPolicyExtensions...

View Article


How does Polly retry policies indicate when number of retries have been...

I have a call that uses a Policy.Handle<PollingResult>(...).WaitAndRetry(...).ExecuteAsync(...) call to wrap a polling operation.Having spent the better part of half an hour reading the Polly...

View Article


Quarkus Kafka consumer with exponential backoff retry

I have the following scenario: I have a Quarkus Kafka consumer that gets events (in JSON) from a topic and sends it on to a downstream system via their own web service).However sometimes there is a...

View Article

Why is my Polly Retry Policy is throwing "caught" exceptions anyway...

Below I am showcasing the policy I am using to handle a PostAsync() request using a HttpClient. However, it seems like even though I passed generic Exception, it still decides to throw it and fail to...

View Article

Image may be NSFW.
Clik here to view.

C# Polly, 1st SqlException retry after 10 seconds then other all retries...

I am implementing Polly to retry SqlConnection errors.This is the logic I need to implement:1st SqlException - retry after 10 secondsTotal retrying time is 3 minutesAfter 1st retry, all other retry...

View Article

AWS Elasticache: Lettuce client: Retry mechanism

I am using Lettuce (https://github.com/redis/lettuce) java client to read/write to AWS Elasticache. Below is the method to read from Cache by passing key. public Object getJson(String key) {...

View Article


Set customBackoff for AWS SDK JavaScript V3 retries

I just upgraded to AWS SDK V3 and I have no idea how to configure retryDelayOptions and customBackoff with it. I couldn't find any example code in AWS's own API reference or online. This is what I was...

View Article

identify retried message with spring kafka producer

What I would like to achieve:I would like to identify the retried message using Spring Kafka when producing the retried message.Background:I am a Spring Kafka producer.I produce messages that I put in...

View Article


How to use SqlRetryLogicBaseProvider to retry connections during Azure SQL...

I have an Azure SQL database, that has automatic schedules to scale up/down depending on dtu usage. During the scale up/down all connections are dropped. So I need to apply a retry logic in my...

View Article

DefaultErrorHandler is not configurable If @RetryableTopic used for retry and...

Spring boot version : 2.7.6Spring kafka version : 2.8.11Issue:I was trying to handle the deserialization issues in code. To handle such issues in code, I created my own class by...

View Article


How do I use the new resilience strategy in polly.core to a fallback strategy...

I have an older policy that fallsback to a custom action.// Several other overloads including one that's synchronous and has `void` as a return type. // Required as some of our older services have not...

View Article

@KafkaListener idiomatic way of nack with retry counter

I have spring-kafka listener:@KafkaListener(...)public void consume(UpdateEvent message, Acknowledgment ack) { processor.process(message); ack.acknowledge();}Questions:Questions:Since I have...

View Article

How to refresh access token when proxied request gets 401 response YARP

That's my YARP configuration:builder.Services.AddReverseProxy() .LoadFromConfig(builder.Configuration.GetRequiredSection("ReverseProxy")) .AddTransforms(builder => {...

View Article
Browsing all 950 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>