Questions tagged [retry-logic]

Programming techniques designed to retry operations that failed due to error codes, exceptions, or other language specific means.

377 questions
0
votes
0 answers

How to perform extensive business logic and retry from where it failed

I am trying to solve a problem where a lot of transactions happening in the business logic. For example: The request comes to the server (Service A) Step 1 - Transaction in DB Step 2 - Call Service B Step 3 - Another transaction to DB Step 4 - Call…
0
votes
1 answer

Retry logic for integrating with an external API

Imagine we have an asynchronous, event-driven microservice architecture in place. As part of some business function, one of our services needs to reach out to a third party API. This API happens to be in the form of a synchronous REST endpoint. How…
0
votes
1 answer

Polly and async method: cannot convert async lambda expression to delegate Task

I am trying to use Polly to wrap an async method. How I get an error with my method, I try this: var myResult = await _politicaReintentar.ExecuteAsync(async () => await Task.Delay(1000)); But I get an error that tells it cannot convert async lambda…
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
0 answers

Cassandra 4.X - Custom retries not getting triggered

I am trying to implement a custom retry as follows but "onWriteTimeOut " is not getting triggered for WriteTimeOutException . "onReadTimeOut" is getting triggered, but not working as expected. ProgrammaticDriverConfigLoaderBuilder…
Poorni
  • 1
0
votes
1 answer

Playwright retry policy for text appearing

I have a use case for needing to reload a page until some text is populated on a page. I'm new to both Playwright and Javascript and am trying to find a good pattern for doing this. My current method uses the async-retry library: const…
Steerpike
  • 1,712
  • 6
  • 38
  • 71
0
votes
3 answers

Using Polly to retry one time with a 200 ms wait on an Async method

I'm trying to do the following using Polly. I have an ExecuteTask async method, and I want to perform a conditional retry with a 200 ms wait. This is what I have so far: The policy AsyncRetryPolicy retryPolicy = AsyncPolicy …
gilpach
  • 1,367
  • 3
  • 16
  • 34
0
votes
2 answers

Should consumer or client to produce retry event?

Let's say we have a Kafka consumer poll from a normal topic that is heavy loaded and for each event, make a client call to service. The duration of client call may vary, sometimes fast sometimes slow, we have a retry topic so whenever client call…
Drex
  • 3,346
  • 9
  • 33
  • 58
0
votes
2 answers

Backoff.DecorrelatedJitterBackoffV2, 1 second start, max around 32 sec in waits, with failFast

I'm using Polly.Contrib for HttpClient retries. var delay = Backoff.DecorrelatedJitterBackoffV2( medianFirstRetryDelay: TimeSpan.FromSeconds(1), retryCount: 4, fastFirst: true); If I want the maximum time waiting to be ~32 seconds…
yzorg
  • 4,224
  • 3
  • 39
  • 57
0
votes
0 answers

EF Core ChangeTracker entities snapshot and reset to that snapshot

Is it possible to take a snapshot of the current state of EF Core's ChangeTracker and then reset later to that snapshot if needed? Let's say I want to make the following code into reality: public async Task ExecuteTransactionAsync(DbContext…
0
votes
1 answer

Sftp Retry Logic Inside Azure function App

I am facing one issue ,where i am getting intermittent error message "An existing connection was forcibly closed by the remote host" while trying to connect sftp server. I am trying to connect sftp inside azure function app. I believe this error…
vmb
  • 2,878
  • 15
  • 60
  • 90
0
votes
1 answer

What is a decent method for re-trying after failed connection of GET, and POST HTTP Methods via RestSharp?

This C# Console application connects to a server using REST with RestSharp this pc where is hosted doesn't have a stable internet connection so sometimes connections go down and want to implement a loop of retry x times. And they're called from…
ISeeMangos
  • 35
  • 4
0
votes
1 answer

gRPC Retry using someApi.withOption

Is it possible to use .withOption to add retryPolicy configurations to a grpc client stub? I've tried something like below but it seems it fails to equals on the key. Is there a better way of doing this please? val someApi:…
obsessiveCookie
  • 1,130
  • 2
  • 18
  • 33
0
votes
1 answer

Polly with cancellation token is not working for synchronous thread

I'm new to Polly so there may be a completely different approach compared to the one I'm trying to do and that would be perfectly OK. My goals are this: I am using timeout strategy as: TimeoutStrategy.Optimistic I want to timeout the call for given…
Monika A
  • 9
  • 2
0
votes
1 answer

''int:delayer' with id='delayRetry''' produced no reply for request Message

Getting produced no reply for request Message from element "int:delayer" implemented inside chain ("int:chain"). Inside delayer expression and default-delay evaluated successfully after that getting below error due to which retry is not working in…
Yogi
  • 11
  • 2
0
votes
1 answer

How can I "requeue" messages in a TPL Pipeline?

I have a fire-and-forget Web Service that processes incoming requests. The request needs to go through number of processes that interact with the database via a single-threaded TPL pipeline. If any process fails the message should be retried but it…
ilitirit
  • 16,016
  • 18
  • 72
  • 111