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

Does Spring Kafka Retry pick messages amongst different partitions?

I would like to know how Spring Kafka handles retries given multiple partitions assigned to an instance. Does Spring Kafka keep retrying the same message according to the retry policy and backoff policy or does it retry, and in-between retrying,…
Pierre
  • 23
  • 4
0
votes
1 answer

Consumer is consuming same message multiple time

I have an Kafka consumer that consumer message . I have set retry template in KafkaListenerContainerFactory . But don't know why it is consuming the same message twice . When the application through exception retry template called with the specified…
Bharat Wadhwa
  • 107
  • 1
  • 11
0
votes
2 answers

How to use resilience4j on calling method?

I tried to use spring retry for Circuit breaking and retry as below and it is working as expected but issue is unable to configure "maxAttempts/openTimeout/resetTimeout" as env variables (error is should be constants). My question is how use…
Raman
  • 35
  • 1
  • 7
0
votes
1 answer

EventListener and retryable

I would like to invoke some code after my application start. Is there any way to handle event: Started SomeApp in 14.905 seconds (JVM running for 16.268) I'm going to try if another application is up. I've tried to use Retryable but not its…
MrNetroful
  • 497
  • 8
  • 28
0
votes
2 answers

Spring Retry performance

I am using spring retry in my application, it works fine. however, i am just concerning about if it will cause the performance issue if there are huge volume of retry say one of the downstream service is down, and before it come back up, there are 1…
user2501711
  • 461
  • 7
  • 16
0
votes
1 answer

Spring-retrial internal implementation

I was going through spring-retry framework tutorial : https://dzone.com/articles/how-to-use-spring-retry But I wanted to know how it works internally. I want to use it for one of my API calls but before doing that wanted to know few things about the…
I_dont_know
  • 341
  • 1
  • 4
  • 17
0
votes
0 answers

Custom RetryPolicy in Spring doesn't retry

I have the following configuration class: @Configuration public class MyAppConfig { @Value("${retry.backoff}") private String retryBackoff; @Bean public RetryTemplate retryTemplate() { RetryTemplate retryTemplate = new RetryTemplate(); …
SkyBlue
  • 267
  • 1
  • 4
  • 15
0
votes
1 answer

How to switch on and off @Recover method in Spring Retry?

I want the @Recover method to be switched on/off based on a flag in the properties file. How to do that? Actually, I am not using annotations (@Retryable / @Recover), instead, I am using RetryTemplate. Solution I am using this following method as a…
Soumitri Pattnaik
  • 3,246
  • 4
  • 24
  • 42
0
votes
1 answer

Spring batch skip items during process and log skipped item in DB and then write the data to DB again

I am new to Spring batch with spring boot and read almost all the possible available article but not found exact scenarios/snippets for use case as below. Read data from DB (for example : 5 Items) Process the data : Call API and if API call Fails…
Ganesh
  • 903
  • 1
  • 8
  • 18
0
votes
1 answer

Error handler not called until after all retries are attempted in Spring Cloud Stream

I am trying to write an error handler for my spring cloud stream application; however, the error handler is only called after all retries have been attempted. Is there a way to catch each exception and process them individually instead of waiting…
user
  • 5
  • 5
0
votes
1 answer

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.create fails but the second one it…
0
votes
1 answer

Spring-retry @Recover method works only in interface definition

I'm using spring-retry to provide retry policy for my business logic. I have Interface and the service that implements it public interface MyInterface { @Retryable(maxAttempts = 5, backoff = @Backoff(value = 0L)) void doSth() throws…
puffy.bun
  • 256
  • 1
  • 10
0
votes
1 answer

how to update the count of the "retry column" when the spring retries invoke web services

Am trying to use spring-retry and i want to update my DB every time the spring-retry works for 5 retries. In database a column need to be updated in order to track if the retry was made 5 times or not.
0
votes
1 answer

Can we configure two RetryConfiguration classes in Spring Retry?

Can we configure the two retryConfigurations classes in Spring Batch for use in Tasklet? I have complex stuff so need two different retry mechanism. Just wanted to understand which retry template should be called out ? Anyone please give me quick…
Jeff Cook
  • 7,956
  • 36
  • 115
  • 186
0
votes
1 answer

Spring Kafka Retry Logging

I have a requirement to consume from a kafka topic,do some work on records and produce to another topic with spring-kafka 2.1.7.Other requiremenrs are transactional for once only semantics,retry and error handling.On failure to commit a record I…
rookie
  • 386
  • 6
  • 19