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
1 answer

DefaultErrorHandler is not configurable If @RetryableTopic used for retry and DLT handler

Spring boot version : 2.7.6 Spring kafka version : 2.8.11 Issue: I was trying to handle the deserialization issues in code. To handle such issues in code, I created my own class by extending DefaultErrorHandler and overriding the public void…
0
votes
1 answer

Explanation of retry logic in Azure Durable Functions

I'm new to Azure Durable Functions and am trying to understand the retry logic and error handling. I have a very simple orchestration function that executes 100 action functions in a fan-in fan-out pattern. My expectation is that when an action…
0
votes
1 answer

How does LazyList.fill(n) actually works in Scala?

I'm trying to understand how does the LazyList.fill actually works. I implemented a retry logic using LazyList.fill(n). But seems like it is not working as expected. def retry[T](n: Int)(block: => T): Try[T] = { val lazyList =…
0
votes
1 answer

Return status code when maximum retries attempted using backoff

Using asyncio and aiohttp, I have implemented an async function that triggers an API get request whenever a new record is inserted into database. If the request is successful, the status code has to be updated in database, otherwise the request…
0
votes
0 answers

Python: How to know if backoff decorator is retrying failed API attempts?

Using asyncio and aiohttp, I have implemented an async function that triggers an API get request. I am trying to add a retry mechanism to this function to asynchronously retry failed API requests 5 times. This is what I have done using the backoff…
Animeartist
  • 1,047
  • 1
  • 10
  • 21
0
votes
1 answer

Azure Data Factory - Retry for an insert Copy Activity (AzureSQL DB)

We’ve had twice intermittent issue of the copy activities running into A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.)…
0
votes
0 answers

Implementing a retry mechanism for an express route using a middleware

I am learning to use express for node.js backend development. I have a task to implement a retry mechanism using middleware, such that if a certain error occurs in previous middleware it will reprocess the entire request, and such that retrying will…
0
votes
0 answers

How to implement long-lived periodic retries with Kafka?

We have a Kafka consumer that consumes an internal topic, processes the message and sends it to an external partner over rest: Topic ---> Consumer ---> Partner HTTP endpoint We frequently get 404 responses for some of the messages we send and want…
0
votes
1 answer

Polly: Retry request with StreamContent and MemoryStream - no content on second try

I'm using Polly in combination with Microsoft.Extensions.Http.Polly to handle communication with an external API which has rate-limiting (N requests / second).I'm also using .NET 6. The policy itself works fine for most requests, however it doesn't…
Eddi
  • 782
  • 1
  • 7
  • 20
0
votes
1 answer

What is the most efficient way to write this retry logic for a try-catch? C#

I have a C# task that I'd like to re run if a certain exception type is thrown. This is what I have currently: bool retry = true; int numOfRetries = 3; int tries; while (retry = true && tries <= numOfRetries) { try { //Task …
Rockets23
  • 71
  • 6
0
votes
1 answer

How to properly handle race condition caused by retry worker

In one of the services we had some connection issues and we are getting random timeouts (we think it is because of the client library. it is one of the caching services). We decided to handle it by putting it in the queue and retrying on a separate…
0
votes
1 answer

How to re run failing test cases using Nunit 3.X?

I am running a suite of 200+ UI test cases and due to some or other reason, 10 or 15 test cases fail. If I rerun them they pass. I want to re-run this random failing 10-15 test case after the execution is completed. I can't use Retry because It is…
0
votes
1 answer

Python asyncio timeout/retry design pattern

Please, look at the code bellow (for sake of simplicity I am not using pydantic to group corutine, retries, timeouts): import asyncio import typing as tp import random async def my_func(wait_time: int) -> str: random_number = random.random() …
user3225309
  • 1,183
  • 3
  • 15
  • 31
0
votes
0 answers

How to use exponential back-off logic in Azure device client?

I have a job in c# which runs every 5 minutes and acts like a heartbeat to check the client status When the status is Disconnected_Retrying, I exit the timer job assuming built in retry logic will work. However, status always comes as…
kudlatiger
  • 3,028
  • 8
  • 48
  • 98
0
votes
1 answer

Retry pattern with configurable handling parameters for exceptions in .NET

I need to enhance basic Retry pattern implementation for handling multiple types of exceptions. Say I want to implement a method (M) that re-attempts some action. And if that action causes an exception, main method catches it and passes to some…
murick
  • 86
  • 1
  • 7