Questions tagged [spring-retry]

Spring Retry provides an abstraction around retrying failed operations, with an emphasis on declarative control of the process and policy-based behaviour that is easy to extend and customize.

The Spring Retry project is refactored from Spring Batch's support for retrying operations as of Spring Batch 2.2.0. It is used in several Spring projects.

See also

469 questions
0
votes
0 answers

Can we call JobLauncher.run outside the doWithRetry function for spring retry?

I tried implementing spring batch retry as mentioned in this problem and i was successful in implementing it. I wanted to implement the same with calling jobLauncher.run outside the doWithRetry function. This is so that anytime I can use the…
0
votes
1 answer

@EnableRetry: error "Superclass has no null constructors but no arguments were given"

I have an error when I deploy my application on a Weblogic server. This error is due to the addition of the @EnableRetry notation. The spring configuration is done by XML. In my projects I use the libraries: Spring spring-web-2.4.0 Spring…
DevJava
  • 41
  • 4
0
votes
0 answers

Netflix Zuul + spring-retry: retry not working on Exception

I have tried almost all the answers/suggestion mentioned on blogs and SO but failed to get a answer. Spring Boot version: 2.2.2.RELEASE Spring-retry version: 1.2.5.RELEASE spring-cloud-dependencies: Hoxton.SR5 I have implemented Zuul proxy with…
0
votes
1 answer

Spring boot @Retryable not working in service class

I'm trying to add retry logic in my application for sending mail to respective users through rest controller and i have annotate @EnableRetry in my SpringbootApplication class file @RestController public class TserviceController { @Autowired …
Sundar G
  • 1,069
  • 1
  • 11
  • 29
0
votes
1 answer

Using Spring retry and circuitbreaker in spring boot 1.3.0 release version

I need to use spring retry and spring circuit breaker in spring boot application with version 1.3.0 Release. The spring retry version bundles with this version of spring boot i.e. 1.3.0 Release don't support circuit breaker. Is it okay if I use…
Pravin
  • 45
  • 1
  • 4
0
votes
1 answer

Resiliance4j - retry custom IntervalFunction with multiple waitDuration?

Resilience4j version: 1.4.0 Java version: 11 I want to achieve the exact thing mentioned here at : https://resilience4j.readme.io/docs/retry#use-a-custom-intervalfunction If you don't want to use a fixed wait duration between retry attempts, you can…
Molay
  • 1,154
  • 2
  • 19
  • 42
0
votes
1 answer

some problem with my Spring Integration flow

I'm using spring boot 2.3.0 version with Spring Integration 5.3.0 and somehow I'm not able to get the below code working.The app starts up, no errors but when control comes to the nextChannelFlow() method, nothing is happening or printed. Can…
kkk
  • 166
  • 2
  • 18
0
votes
1 answer

Is it possible to set RetryPolicy in spring-retry based on HttpStatus status 200 or 207?

I am doing a batch call where overall response is success from batch API but some calls of batch might be failure so event if rest-Template provide successful response i want to parse the response and if i find an error status Code while parsing i…
0
votes
1 answer

Spring retry - can @Recover be in standalone class?

I have a Spring Integration app with multiple endpoint that process the same data in different ways. They all have identical '@Recover' methods which has become boilerplate and seems fragile. Can you you centralize the @Recover method (e.g. in a…
user1016765
  • 2,935
  • 2
  • 32
  • 48
0
votes
1 answer

Error in adding a custom BackOffPolicy to spring-retry

I am facing error in adding a custom BackOffPolicy to spring-retry I followed the approach from Incremental linear backoff in Spring Retry . My Retryable method is @Autowired private RetryOperationsInterceptor retryOperationsInterceptor; …
0
votes
1 answer

Retry not working when Spring Batch managed transaction rolls back

In one of the steps of my Spring Batch job, I'm trying to configure it so that when ObjectOptimisticLockingFailureException happens, the step can be retried and hopefully the retry will work. @Bean public Step…
xli
  • 2,420
  • 2
  • 20
  • 27
0
votes
1 answer

Is it possible to customize the backoff policy used by a retry template based on HttpStatus Code

I am evaluating spring-retry for a use case where we need to automatically retry certain API Calls Based on Status Code. I am able to customize the retry policy like this @Component("httpStatusCodeRetryPolicy") public class HttpStatusRetryPolicy…
Paul Plato
  • 1,471
  • 6
  • 28
  • 36
0
votes
0 answers

Spring JPA Not fetching the latest record from Database

I have a method that updates the database with User's referencenumber and then i have a Spring retry mechanism to retry and check if the User's record is updated with reference number. But the retry call doesnt fetch the latest record from Database.…
Dev
  • 31
  • 1
  • 8
0
votes
1 answer

Retry handler in Spring Java DSL

currently, I have Spring Integration Flow where reading payload from JMS queue, transforming to XML format, then send the XML payload to the core app. at the RecordSenderHandler, there is logic to make call rest API to my core app and store the…
0
votes
1 answer

How can i use @Retryable(label="...") for logging or monitoring purposes?

I have simple retryable method annotated with @Retryable(label = "myLabel") According to documentation, it should be A unique label for statistics reporting Is this label accessible inside RetryListener? How can i use it?
hendrix
  • 3,364
  • 8
  • 31
  • 46