Skip failures in SmallRye Mutiny when it calls to a Rest API in Quarkus and reactive programming #1666
Unanswered
allanh1193cr
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a method to call an external rest API and save the response from that API in a list and return the list to continue the process. Basically, this is what I'm doing
I have a request list to call to the rest API n times. I iterate over that list and call the rest API one by one.
If the call to the rest API fails and the error type is a httpStatusCode 500 I will retry 3 times the call to the rest API. If the call is still failing. I will send the request to a DLQ and the idea is to continue with the next request**(here is the problem)**.
I save the response of the call to the rest API using a map
Convert to list the responses and return a Uni.
This is the code I have created, I tested and the retry is working, I'm sending the request to the DLQ successfully but the issue is when I map the response(it does not exists). How can I continue to the next iteration in case of the retry fails the three attempts without call to
.map
operation?Beta Was this translation helpful? Give feedback.
All reactions