Concurrent asynchronous actions with Mutiny #23649
Replies: 4 comments 4 replies
-
Hello Clement, thank you for the interesting example. How would it have to be changed to have the two requests to two different services independent, e.g. if call to remote service A fails, response from remote service B should still be processed and not blocked by the failing remote service A, thus like the opposite of combine somehow. |
Beta Was this translation helpful? Give feedback.
-
@syr, you should be able to use private static Uni<String> getProgrammingQuote(WebClient client) {
return client.getAbs(PROGRAMMING_QUOTE)
.as(BodyCodec.jsonObject())
.send()
.onFailure()
.recoverWithItem("Fallback")
.onItem().transform(r -> r.body().getString("en") + " (" + r.body().getString("author") + ")");
} The final |
Beta Was this translation helpful? Give feedback.
-
Does this example really show anything, which suppose to be executed in PARALLEL? My logs are showing, that after Uni.combine() every call is being executed concurrently on the same thread. |
Beta Was this translation helpful? Give feedback.
-
How i can run this? when i try to run this inside a function I get an error like
|
Beta Was this translation helpful? Give feedback.
-
Concurrent asynchronous actions with Mutiny
Quarkus: Supersonic Subatomic Java
https://quarkus.io/blog/mutiny-concurrent-uni/
Beta Was this translation helpful? Give feedback.
All reactions