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

Spring Cloud Stream Kafka DLQ via Retryable/Recover

My usecase is to receive Kafka messages, make multiple attempts at a rest call and upon exhaustion dump the failed mesage onto Kafka DLQ topic. @StreamListener(EventSource.SOME_CHANNEL) public void processMessage(Message
0
votes
0 answers

Spring Batch - Call Tasklet from another Tasklet with retry mechanism?

In Spring Batch I am looking to implement the retry mechanism. I have the steps configured below This batch jobs actually runs and create the Payment csv files and place it to the outbound folder of my application server and through Tasklet I am…
Jeff Cook
  • 7,956
  • 36
  • 115
  • 186
0
votes
0 answers

RetryOperations is it required?

Does RetryOperations required when I use retry-spring ? or is it enough to have the annotation over my method? @Retryable(value = {SQLException.class, Exception.class,RuntimeException.class, RetryException.class, ExhaustedRetryException.class},…
Samarland
  • 561
  • 1
  • 10
  • 23
0
votes
1 answer

Can't get Spring Retry to work

I've been attempting to make my Spring application use Spring Retry for the past few days with no luck so far. I have an XML based config so I've tried adding
0
votes
1 answer

org.springframework.retry.support.RetryTemplate in spring-retry support for Spring 5.0.X

I'm trying to upgrade spring to 5.0.6.RELEASE. Just checking to see if org.springframework.retry.support.RetryTemplate in spring-retry project is supported with spring 5.0+ framework version.
Cys
  • 137
  • 3
  • 13
0
votes
1 answer

RequestHandlerRetryAdvice with HttpRequestExecutingMessageHandler not working

I have the below configuration file. @Configuration @PropertySource({ "application.properties" }) @EnableIntegration @IntegrationComponentScan @EnableRetry public class IntegrationBeanConfiguration { @Bean public SimpleRetryPolicy…
AbNig
  • 391
  • 1
  • 6
  • 24
0
votes
2 answers

Spring 4 - Spring retry 1.2.1.RELEASE @Recover not working

I have created an adapterImpl class that will retry a method with an objA but if it throws an exception(hardcoded to throw) it will call recover method - which will again call the method with objB. My problem is - The @Recover method is not called.…
user93726
  • 683
  • 1
  • 9
  • 22
0
votes
1 answer

BackOffInterruptedException thrown during api call with spring retry

Exception class signifiying that an attempt to back off using a BackOffPolicy was interrupted, most likely by an java.lang.InterruptedException during a call to java.lang.Thread.sleep(long). Above exception thrown during external api call in my…
Bravo
  • 8,589
  • 14
  • 48
  • 85
0
votes
1 answer

@Recover annotated method is not discovered for a @Retryable method that also is @Scheduled

I studied the answer from this question @Recover methods are not triggered with @Retryable But I can't figure out why recover method does not run in my case. @Service public MyRetryingService { @Scheduled(fixedRate = 10 * 1000) …
Kamal Joshi
  • 498
  • 1
  • 7
  • 19
0
votes
1 answer

How to execute some code after all retries are exhausted in spring batch?

I have set the maximum number of retry as 3. I have added only RemoteAccessException as retry-able exception. What I want to do, is to change the state of some of the entities to error and persist them to database after all retries are exhausted.…
Sourav Ghosh
  • 13
  • 1
  • 7
0
votes
2 answers

Spring-Retry: Create custom annotation similar to @Retryable

I have a number of microservices which needs a retry mechanism if connection with database fails. This retry mechanism has to be triggered when SQLException and HibernateException occurs. Passing a proper interceptor in @Retryable will work but this…
0
votes
1 answer

Issue with Spring retry for Exception Block

I am trying to use retry https://www.mscharhag.com/spring/spring-retry but facing an issue. I have a method public String methodA( T Object) { try{ }catch(someException sme){ return fixit(Object); } } @Retryable(value =…
Sajna
  • 79
  • 1
  • 9
0
votes
1 answer

Want to call a Rest POST endpoint with retries using a circuitBreaker

I am running a test from job which makes a http POST submission to 3rd party REST endpoint and implemented retry using requestHandlerAdvice with backoffpolicy policy set as exponential. I was thinking is there a way to implement circuitBreaker with…
0
votes
1 answer

Is Spring Batch JpaItemWriter stateful?

Is Spring Batch JpaItemWriter stateful? i mean if through writing process a failure happened does it know where is that left?
0
votes
1 answer

Retryable not works in separate thread

I am trying to test, if my method call was retried several times if some exception takes place. And if I call method directly, it works okay. But if I call it in separate thread, my test method fails it doesn't see any retry attemps. That's my…
Sviatlana
  • 1,728
  • 6
  • 27
  • 55