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

Implementing non-blocking Retry Mechanism in Java

@Retryable annotation in Spring Retry mechanism is blocking thread during retry. Do we have any retry mechanism which is not blocking thread for a particular task during backoff time and can execute other tasks ? With @Retryable annotation, the…
0
votes
2 answers

How does Spring Retry work under the hood?

Trying to understand how the retries are implemented, I'd expect to see something like threads in the source of Spring Retry - but don't. I'd like to know how retrying is implemented, if not as per threads. Additionally I didn't find an @Aspect that…
Mr. Gung
  • 117
  • 1
  • 9
0
votes
1 answer

how to have Diff retry attempts for diff exceptions while implementing non blocking retry mechanism?

I have a requirement where I need to have diff retry attempts for messages of the same topic based on diff exceptions i.e 3 Retry attempts for timeout exception with a delay of 5 min and 10 retries for Pending exception(custom exception) with a…
Ankur Goel
  • 99
  • 1
  • 1
  • 7
0
votes
0 answers

Implement dynamic retry logic in Spring boot application with different inputs

Working on migration of old application written in groovy-grails along with spring-integration framework. Application has different APIs written and Spring-Integration is mainly here to drive flow of API logic to call sequence of actions and retry…
0
votes
1 answer

java spring retryable not working as expected

I'm working on an spring boot app configure like this : @SpringBootApplication @EnableRetry public class SpringBootApp { public static void main(String[] args) { SpringApplication.run(SpringBootApp.class, args); } } I've a Kafka listener…
RVA
  • 790
  • 3
  • 14
  • 33
0
votes
2 answers

How to refresh arguments after exception with @Retryable?

I have the following code: @Retryable(value = ObjectOptimisticLockingFailureException.class, maxAttempts = 10, backoff = @Backoff(delay = 50L)) public void foo(Request request, String status) { request.setStatus(); // some additional logic …
0
votes
0 answers

Spring Batch Itemwriter Rest API post call

what are your thoughts on firing rest post calls as part of ItemWriter ? Also what is the best approach to track failures so that when we restart it picks only those failures/start from where it left off in the previous run
0
votes
0 answers

Retry Kafka message

The services consumes messages from Kafka and then sending them as emails (org.springframework.mail.javamail). Sometimes there is connection interruption happening and I would like to retry to send the message again. I'm using RetryTemplate as…
user3475366
  • 113
  • 1
  • 11
0
votes
0 answers

BUILD FAILURE with spring-retry on spring cloud services

I have a set of services that use spring-cloud, connect to a config server, and register to a eureka server. I created a docker-compose.yml document in order to pull up all the containers in a simple way. so far so good There was a problem: the…
Federremu
  • 84
  • 1
  • 7
0
votes
1 answer

Spring retry with different backoffpolicy for each retry based on Retry-after header from HTTPStatus code 429

We have situation and architecture looks like below. RabbitMQQueue -> Spring Boot RabbitMQ Listener -> Service Layer -> (Network call). In above network call depends on the URL sent in each message from the queue. Now many times this network calls…
0
votes
1 answer

RetryContext is not updated to exhausted=true, on reaching maxAttempts

Is there a bug in the spring-retry using retryTemplate ? I see that after the maxAttempts are reached, the retryContext should be updated to exhausted=true, but I still see it false as seen in the log below in my recovery…
0
votes
0 answers

Non-blocking exponential backoff retry mechanism for Spring Cloud with RabbitMQ

I have a consumer: @Bean public Function>, Mono> myReactiveConsumer() { return flux -> flux.doOnNext(this::processMessage) .doOnError(this::isRepetableError, ?message -> sendToTimeoutQueue(message)?) …
0
votes
1 answer

spring-kafka: RetryTopicConfiguration with custom names for retry and dead letter topics

I have supplied a bean for retry topic config: @Bean public RetryTopicConfiguration kafkaRetryTopicConfig(...) { return RetryTopicConfigurationBuilder .newInstance() .fixedBackOff(...) .maxAttempts(..) …
Higher-Kinded Type
  • 1,964
  • 5
  • 27
  • 44
0
votes
1 answer

Spring Boot Retry Not Working As Expected when using with Transactional

Component - 1 @KafkaListner public void method(){ service1.method1(); } Service - 1 @Transactional public void method1(){ service2.method2(); } Service - 2 @Transactional @Retry(Exception.class,3) public void method2(){ some logic…
0
votes
1 answer

spring-kafka: How to provide RetryTopicConfiguration to ConcurrentMessageListenerContainer?

I have to set up Kafka consumers without using annotations. I have something like this: public class MyCustomListener implements MessageListener { private final String topicName; private final Class
Higher-Kinded Type
  • 1,964
  • 5
  • 27
  • 44