I noticed two guide on Rest Client: MicroProfile and Vertx. Since MicroProfile supports asynchronous, what is the advantage of using Vertx-based Rest Client ?
2 Answers
Here are some differences between the 2 approaches:
- the MicroProfile Rest Client is not non-blocking. The Vert.x web client is.
- if the rest of your code uses RX Java, the Vert.x client has a neat RX Java API.
- the MicroProfile Rest Client is using an annotation-driven approach, the Vert.x client is API-driven
So it depends on your use case. Of course, you can combine both in the same application.
https://quarkus.io/guides/rest-client
MicroProfile restclient is async and non-blocking as well. Just use CompletionStage as return type.