Programming techniques designed to retry operations that failed due to error codes, exceptions, or other language specific means.
Questions tagged [retry-logic]
377 questions
0
votes
1 answer
how to print delay sequence in spring retry
I know to print number of counts inside retryable method. how to print delay sequence inside retryable method
@Retryable( value = SQLException.class,
maxAttempts = 3, backoff = @Backoff(delay = 1000))
void testMethod(String abc) throws…

Velmurugan A
- 348
- 3
- 7
0
votes
1 answer
Polly and HttpClient infinite request
I try to use Polly with HttpClient request.
This is my code:
public static async Task callAsync(int IdHeader)
{
ResponseWs w = new ResponseWs();
w.retCode = 1;
w.Message = "Errore Generico";
…

DottorCry DottorCry
- 19
- 2
0
votes
3 answers
Polly: Is there any way/method in WaitAndRetryAsync that can be treat as RetryCompleted?
I have a query - Could you help me If have completed the number RetryCount in WaitAndRetryAsync but still not getting StatusCode.OK. Then I want to through the exception. So How can I do this?
Or is there any way if a number or retry count is…

Sheriff
- 738
- 10
- 20
0
votes
1 answer
Retry failed service call but use different implementation
The code I'm working with has the following structure.
public interface SomeService {
Optional getThing();
// more methods
}
public abstract class SomeServiceBase implements SomeService {
Optional getThing() {
…

Gregg
- 34,973
- 19
- 109
- 214
0
votes
2 answers
How to send NACK to Solace queue from Solace listener using JMS API?
Need your help to find the solution. Current implementation details:
SolConnectionFactory connectionFactory = SolJmsUtility.createConnectionFactory(); // for create connection factory using host , vpn,trust store,keystore with auth scheme…

karuppusamy
- 3
- 1
0
votes
1 answer
Python retries on all exceptions except a list of exceptions
Most guides & posts talk about the reverse where you decide which exceptions to retry on ahead of time. Perhaps I'm thinking about it the wrong way, but for example, I'm trying to get google service account credentials
def…

phamjamstudio
- 93
- 1
- 5
0
votes
1 answer
Spark Java programmatically mark task as failure
As spark provides the feature of job failure detection and retries mechanism, I want to use this feature for my code, which means for some scenarios I want to mark spark Job as failed and then spark will retry that job again.
I tried to find out the…

Ketan Kumbhar
- 85
- 1
- 1
- 8
0
votes
1 answer
Lambda doesn't reattempt processing the SQS message even after an error is returned from the handler
I am trying to invoke the lambda function using standard SQS. I have handled errors using a try-catch block and whenever an error is caught, it will be returned. Otherwise, a response message will be returned with 200 OK.
I want to reprocess the…

Dasith U Edirisinghe
- 41
- 4
0
votes
1 answer
Best way to implement retry with exponential backoff with elasticsearch 7
I am upgrading from ES5.6 to ES7. In the past, we cloned ES5 repo and added custom code for retry with exponential backoff.
public void doRetryWithExponentialBackoff(BasicCallback mainAttempt, ExceptionHandlingCallback onFailure) {
int…

A_G
- 2,260
- 3
- 23
- 56
0
votes
1 answer
EventGrid retry using mock message?
Is there a clean retry mechanism for EventGrid messages that were successfully delivered, but downstream processes failed and message needs to be sent again?
Example:
EventGrid message triggered based on blob upload to Azure Storage
EventGrid…

ericOnline
- 1,586
- 1
- 19
- 54
0
votes
1 answer
Retry pattern for commands to device and async notifications
Here is use case I am working upon.
I have few LoRa based devices connected to thingsnetwork server. These devices are used to Switch on/off light. I am using Azure functions to send the commands to the devices (e.g. switch ON light) using…

Ganesh
- 103
- 12
0
votes
1 answer
How to unit test that a new InputStream was used during a retry?
I have a couple of methods that send HTTP requests to upload an input stream to S3. If the request to S3 fails, there is a retry strategy to attempt to send the request again on certain status codes. Since we cannot guarantee that the input stream…

unboundedcauchy
- 113
- 2
- 8
0
votes
2 answers
python selenium webscraping. How to keep retrying when network is down or the scraped website is slow?
I am trying to scrape a table from web using selenium in python. But the website is very slow and there are many network issues most of the time. So I would like the code to keep trying even if the website takes time to load. I have to scrape 941…

adc admin
- 23
- 10
0
votes
0 answers
Retrying Method
I am communicating with a device via UDP, I send a message and I receive the response.
public byte[] Rx_message = new byte[12];
public byte[] packedMessage2 = new byte[12];
public IPEndPoint sendEndPoint;
public void…

QuatreHuit
- 1
- 5
0
votes
1 answer
C# Azure: How to set Azure timeout and retry policy when running locally?
I am writing C# code that runs against an Azure cloud. My application is an ASP.NET Core web service that exposes methods but no UI.
Sometimes I want to run my code locally using Microsoft Azure Storage Emulator. When my code starts up, one of the…

Claus Appel
- 1,015
- 10
- 28