Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
89 views

I have a simple Service class that makes call to a third party API to create or update the record. I have 2 separate methods in my service class to make the POST and PUT call. The service class first ...
Abhinash Jha's user avatar
1 vote
0 answers
64 views

I have a code like this .retryWhen(Retry.max(3).doBeforeRetry( retrySignal -> authHeaders.add(HttpHeaders.AUTHORIZATION, obtainOAuthToken(...
Rajib Sharma's user avatar
0 votes
0 answers
92 views

I'm building a Spring Kafka application that processes messages asynchronously using asynchronous return types. I'm also using @RetryableTopic to handle retries. However, I’m facing an issue where ...
aalbatross's user avatar
0 votes
1 answer
268 views

I'm trying to use @Retryable and @Recover and there's clearly something I am missing. The (very paraphrased, very simplified) code is essentially // MyRetryableException is a RuntimeException @...
QuantumMechanic's user avatar
0 votes
1 answer
113 views

I have some problem. I need transfer really big amount of data from oracle DB to some other DB. But in my results always some data is missed. I have easy query just get two columns from some table. ...
RafalQA's user avatar
  • 141
0 votes
1 answer
154 views

I am using Spring Retry by creating a RetryTemplate as follows: import com.example.MyRetryProperties; import com.example.SomeRetryableException; import lombok.RequiredArgsConstructor; import org....
Georgii Lvov's user avatar
  • 3,840
0 votes
1 answer
117 views

I have an issue when two threads try to create an entity in my database. The first thread checks if the object exists, sees that it is not there, and then creates it. However, at the same time, the ...
magnetiktank's user avatar
0 votes
2 answers
285 views

I've started using the @Retryable annotation in my Spring Boot application (Spring Boot 2.7.18, JDK 21) and it works perfectly fine! Below are some relevant extracts from the code: @EnableRetry @...
Gep's user avatar
  • 928
0 votes
0 answers
107 views

I would like to introduce Retry and CircuitBreaker mechanism from the database calls. For which I am using SpringRetry and Resilience4j libraries. I have added a code like this and the retry and ...
Ryuzaki's user avatar
  • 813
0 votes
0 answers
571 views

I'm trying to add retry logic on my @Service method and it's not working if the method is suspend. (It's Kotlin/Gradle/Spring project). Below is the working method (just for test): @Retryable(...
Ekaterina's user avatar
  • 1,922
0 votes
1 answer
113 views

My application has a primary and secondary source for data. If the main method fails to retrieve data from the primary source, it fallback to the recover method and attempt to search in the secondary ...
Alex's user avatar
  • 1
0 votes
1 answer
49 views

A retry may lead to a new exception based on the first transaction. To aid in troubleshooting, how to preserve the first error message even if the maximum number of retries is attempted. Thanks
tony's user avatar
  • 123
0 votes
1 answer
390 views

Springboot version: 3.3.2 Java: 21 import io.cloudevents.CloudEvent; import java.io.IOException; import java.util.List; import lombok.extern.slf4j.Slf4j; import org.apache.hc.core5.http....
Haohong's user avatar
-1 votes
1 answer
1k views

Retryable is not working when I use Mockito in Springboot for a Junit test case Below is my code Dao Class: @Component public class RetryDao { public Integer getNumber(String s) throws ...
Sat's user avatar
  • 4,338
0 votes
1 answer
308 views

How can I retrieve the name of the implementation class name from the RetryContext in the onError method of my RetryListener import org.springframework.retry.annotation.Backoff; import org....
Sravan Gajula's user avatar
-1 votes
1 answer
54 views

I want to implement exponential back off for some errors which appear rarely due to some downtimes in GCP Datastore. My idea is to use @Retryable but I want to catch only the exception related to the ...
Edgar Hernandez's user avatar
1 vote
1 answer
1k views

I have a Spring project wherein I am using @Retryable annotation on a method. The method calls an API and posts some json payload to it. I have set maxAttempts as 4 and a retry delay of 20 ms using ...
Tech Savy's user avatar
0 votes
1 answer
189 views

I have a @Retryable placed at the class level. @Import({GrpcClientRetryConfig.class}) @Retryable(interceptor = "grpcClientRetryInterceptor") @Component public class Profile { public void ...
tuk's user avatar
  • 6,954
1 vote
1 answer
293 views

I have specified a @Retryable annotation in a spring bean like below. @EnableRetry @Import({GrpcClientRetryConfig.class}) @Retryable(interceptor = "grpcClientRetryInterceptor", label = "...
tuk's user avatar
  • 6,954
0 votes
1 answer
292 views

I am trying to test @RetryableTopic feature of Kafka where after retrying the message 3 times , I would like to push it to Kafka SQS. I am getting call from retry thread 4 times and call to DltHandler ...
Loren's user avatar
  • 350
1 vote
2 answers
123 views

I am using a spring integration chain of service activators to process an incoming message from a queue. One of the service activators messagePersister that persists the incoming message. If this ...
VPN236's user avatar
  • 27
1 vote
0 answers
725 views

I am getting Cannot locate recovery method exception while trying to call a method which is annotated as @Retryable, I have created a recover method also with annotation @Recover, But somehow it seems ...
Geek_To_Learn's user avatar
1 vote
1 answer
215 views

I am experiencing a RollbackException being thrown when closing a transaction. For some context, during this transactional there is a retry attempt which is successful. The structure is like below but ...
Mark Park's user avatar
0 votes
0 answers
175 views

If there is an error in the db connection while using spring boot, what can be done so that the retry mechanism is activated and the db connection is tried several times?
JuniorDev's user avatar
1 vote
3 answers
2k views

I'm trying to have a spring boot app retry to connect to a database when a connection fails and currently have this: package backend.configuration.dbconnection; import lombok.extern.java.Log; import ...
ArneVC's user avatar
  • 27
0 votes
0 answers
83 views

I have some method, that returns object with field boolean done: public OperationResponse getOperationResponse(YaRequest request) { // ... } class OperationResponse { boolean done; } And if ...
NeverSleeps's user avatar
  • 2,010
0 votes
0 answers
192 views

I am using the spring-retry dependency and I need to add Spring Retry information (counters for number of attempts, successes, failures, timeouts) to Spring Actuator is this possible? There is also a ...
Isaev Maxim's user avatar
0 votes
1 answer
924 views

I wrote a Spock test to exercise a service using Spring-retry, the test context doesn't get setup correctly somehow. The specific error is (line breaks inserted by @kriegaex): [ERROR] ...
Nathan Hughes's user avatar
0 votes
1 answer
73 views

I'm trying to write a unit test for resttemplate.getForEntity() method and trying to cover Exception.class catch block. Below is the code for same: import com.google.gson.Gson; import org.slf4j.Logger;...
Sweta Sharma's user avatar
  • 2,844
1 vote
1 answer
4k views

I'm trying to implement a retry mechanism using spring retry. However, retries are not working. I have added @EnableRetry annotation in the main class Below is the code of the service class. I want to ...
Sweta Sharma's user avatar
  • 2,844
0 votes
1 answer
1k views

I have a topic which contains 2 types of messages: one is to create the data and one is to update. I have a situation where some of the update events reaches before create one's. I'm trying to ...
arthus's user avatar
  • 33
1 vote
0 answers
621 views

I would like to test retries of Spring Retry that I have added to my Feign client. The problem is that my client looks like this: @FeignClient(some config) public interface MyClient { @PostMapping(...
Chanandler Bong's user avatar
1 vote
1 answer
3k views

I'm trying to add retries to my calls using Spring Retry (newest version). I've added the following annotation: @Retryable( maxAttemptsExpression = "${retry.app.maxAttempts}", ...
Chanandler Bong's user avatar
1 vote
1 answer
620 views

I am using Retry Template which should retries 5 times on DataAccessResourceFailureException and for every other, No retry. private static RetryTemplate setupRetryTemplate() { RetryTemplate ...
Shail Panchal's user avatar
0 votes
1 answer
93 views

I have a simple Rabbit listener which always throws AmqpRejectAndDontRequeueException (to test if listener can handle multiple invalid messages). The config is: @RabbitListener( id = TestConfig....
Ruslan's user avatar
  • 1
0 votes
1 answer
827 views

I am using Spring Kafka as retry mechanism. I configured Kafka listener to retryable topic with following code: @RetryableTopic( include= {SystemException.class}, ...
user1794708's user avatar
0 votes
1 answer
232 views

I have a service that calls a 3rd party rate-limited API. The API follows the common pattern of returning a 429 response code w/ a Retry-After header containing the amount of time to wait before ...
Becca Gaspard's user avatar
0 votes
2 answers
2k views

Trying to configure spring boot retry for simple method. When set maxAttempts = 3 xecuted 9 times. When maxAttempts = 2 executed 4 times. Below is my controller class. @GetMapping("/...
akalanka's user avatar
1 vote
1 answer
2k views

I am trying to implement retries on the methods of a class that extends JpaRespository. For all the methods annotated with @Query the retries work as expected (3 retries, and then the error is thrown ...
PCcorrosive's user avatar
2 votes
1 answer
8k views

i need to implement a recovery method that kicks in only in some specific cases. is it possible with Spring Retry? it seems i can't do it using just: Policy as it can't change an error into a correct ...
piotrek's user avatar
  • 14.7k
0 votes
0 answers
819 views

I have a very simple setup for calling an external service and retrying 3 times but I just can't make my Tests to work with Retryable. In my tests my method only gets called 1 time and stops even ...
alejo.montania's user avatar
2 votes
1 answer
1k views

I am using @Retryable at various service methods. Some of them need some action to be done before the retry happens. I use a RetryListener implementation to achieve this. Well, that ended somehow ...
00schmidt's user avatar
0 votes
2 answers
1k views

I am using Spring Retry. Earlier, I used @Retryable(value= Exception.class) & it worked correctly with retryAdvice(). The code correctly retried after getting any kind of exception. Recently, we ...
lavin249's user avatar
0 votes
1 answer
260 views

I have a service that uses SLF4J and Spring's RetryTemplate: retryTemplate.execute( retryContext -> { // Try to do something... return null; }, ...
KJ0797's user avatar
  • 285
0 votes
1 answer
365 views

I'm studying Spring Kafka, and I came across the @Retryable annotation, which supposedly implements retry logic asynchronously according to the annotation's comments. However, while examining the code ...
samsamsamsmasma's user avatar
0 votes
1 answer
96 views

I am implementing Spring Retry, specifically for dead-lock scenarios, and there are several threads that get created further within my service (sending emails, etc). The issue I am facing is the lack ...
Mark Park's user avatar
2 votes
0 answers
434 views

I'm pretty new to using Spring React and have a possibly simple issue here. I have setup a WebClient from a WebClient.Builder. Everything works totally fine except the request is not retried on a ...
gwcoderguy's user avatar
1 vote
1 answer
1k views

I would like to retry consuming a message on processing/deserialiation failure for a finite number of times. After the retries are exhausted, I would like to log a message, commit the offset and move ...
tinku's user avatar
  • 37
0 votes
0 answers
732 views

For example, the method was called at 12:00:00 but failed. I like it to retry at 12:00:01, 12:00:06, 12:00:16, 12:00:46, 12:01:46 How could I make it happen using Spring Retry in Java I tried the ...
Pip's user avatar
  • 27
2 votes
0 answers
663 views

I have an simple class to test @Retryable annotation: @Component public class SimpleRetryComponent { private final AtomicLong counter = new AtomicLong(0L); @Retryable(maxAttempts = 3, backoff = @...
PolGraphic's user avatar
  • 3,382

1
2 3 4 5
10