Questions tagged [retrytemplate]

The tag has no usage guidance.

retrytemplate
Filter by
Sorted by
Tagged with
2 votes
1 answer
4k views

Spring RetryTemplate execute retry only on specific type of response (not on an exception)

Background: I am calling a REST API to download a text file from a spring boot app. The problem is that the server takes time to generate the file and then make it ready for download. So, I am using ...
AMagic's user avatar
  • 2,760
1 vote
1 answer
2k views

Kafka Listener : unable to prevent retry on a particular exception using SimpleRetryPolicy

I have a Kafka listener which can throw a JsonProcessingException and another custom exception (Lets say exception X) . I want kafka listener to retry only when a JsonProcessingException is thrown , ...
Mayank Madhav's user avatar
2 votes
1 answer
5k views

Spring RetryTemplate return usage

For example I've a Spring RetryTemplate configuration: @Configuration @EnableRetry public class RetryTemplateConfig { @Bean public RetryTemplate retryTemplate() { SimpleRetryPolicy ...
takotsubo's user avatar
  • 694
0 votes
1 answer
6k views

Spring Kafka Consumer Retry with backoff interval of long duration giving "org.apache.kafka.clients.consumer.CommitFailedException"

I am new to Spring-Kafka and trying to implement retry in case of failure or any exception during kafka message processing using Spring Kafka RetryTemplate. I have used the following code: //This is ...
meena's user avatar
  • 77
1 vote
0 answers
1k views

How to catch a specific exception using retry template

I am trying calling a number of services, each service is dependent on the previous call. Each call I have created my own retry logic but I have only recently discovered the Spring retry template and ...
bootlover123's user avatar
1 vote
1 answer
10k views

Spring Retry with RetryTemplate in Spring Boot, Java8

I am using Spring Boot 2.1.14.RELEASE, Java8, Spring Boot. I have a client from which I have to access another rest service. I need to retry an Http404 and HTTP500 2 times whereas not retry any other ...
coder0h1t's user avatar
  • 443
0 votes
1 answer
468 views

Retry with 30 minutes delay

I need to call a external rest service, if it fails on first attempt then I have to call again after 30 minutes. Max 3 time I can call like this. I know spring has RetryTemplate for the retry. But I ...
user12258186's user avatar
0 votes
0 answers
951 views

Spring boot execute second retry method after first retry method is successful

I wanted to create two retry methods. Where in second retry method is async method. It should be hit only after successful completion of first method. @Retryable(value = { LockedException.class }, ...
gowtham g's user avatar
1 vote
1 answer
468 views

Get the current backoff value when using Spring RetryTemplate

So I've been experimenting with Spring's Retry Template. Everything is working as expected. One thing I would like however is the ability to extract or log the current backoff time that's being used....
djkelly99's user avatar
  • 600
0 votes
0 answers
246 views

How to Apply a Spring Batch RetryTemplate to a Chunk based Step / ItemWriter?

I am working on a Spring Batch Program, that should Read a CSV file, Process it and then send it insert its content into a Database. The Jobs are startet via rest-Joblauncher (in case that helps). ...
eckad158's user avatar
  • 395
4 votes
1 answer
2k views

StreamRetryTemplate for Spring Cloud Streams not retrying in integration tests

We are utilizing Spring Cloud Streams that listen to a Kafka topic and call a rest service. We also implement a custom StreamRetryTemplate to specify what kind of errors we deem recoverable and which ...
chas spenlau's user avatar
-2 votes
2 answers
1k views

How to pass parameter to java lambda

I am using Spring RetryTemplate and using this method. Wanted to pass some argument (vendor) it is giving me compilation error. I can create a another variable vendorName as final can send it. But I ...
Kiran's user avatar
  • 849
0 votes
1 answer
1k views

Spring retry with retryTemplate - unit tests

I am using retryTemplate and I have no idea how to do the unit tests for this. Can any one help? I have this piece of code (for example) and I would like to test that the first time I call Card....
Fany Castro Vizoso's user avatar
1 vote
1 answer
6k views

Retry feature is not working in Spring Batch

I have a batch job where i am using ScriptBatch.3.0.x version. My use-case is to retry the job incase of any intermediate failures in between. I am using the Chunk based processing and ...
TikTik's user avatar
  • 357
3 votes
0 answers
2k views

What should I do with BackOffInterruptedException in Spring's RetryTemplate?

I'm going through automatic error reports from my desktop application, and I have this exception which I'm not sure how to handle: java.lang.InterruptedException: sleep interrupted at java.lang....
Pablo Fernandez's user avatar