Closed jmini closed 1 year ago
/cc @FroMage (resteasy-reactive), @evanchooly (kotlin), @geoand (kotlin,resteasy-reactive), @stuartwdouglas (resteasy-reactive)
You can't use the Jersey client with RESTEasy Reactive. You either use our implementatio of the JAX-RS client (quarkus-jaxrs-client-reactive
) or our implemenation of the Microprofile REST Client (quarkus-rest-client-reactive
).
@geoand thank you for the quick confirmation. I already thought this would be the case, but it is not written in the documentation.
If the Jersey part is something that I can change. The client library already exists (and is not something I can change) and is embedding Jersey jars as transitive dependencies.
What are my options at quarkus level? Use reative-routes to write the endpoint?
An other check I could do is to verify if the client is really relying on Jersey, or if they are just using the JAX-RS api. In that case I might be able to exchange the lib implementing the JAX-RS API. Not sure this would work 🤔...
This topic of the embedded java HTTP clients is really something that make me think a lot. I started this discussion: How to write a REST client library that is framework agnostic but never got any answer.
It turns out that starting Quarkus 3.4.0 your use case works somewhat better (thank to https://github.com/quarkusio/quarkus/pull/35558), but I'll reopen the issue and see if things can be improved further.
Now WRT framework agnostic clients, I like what Fabric8 Kubernetes Client
, Testcontainers
and OpenTelemetry
have done: That is to create an SPI and then have various implementations (like OkHttp, JDK HttpClient, Vert.x etc).
That also allows a framework like Quarkus to even plug in its own implementation.
Describe the bug
A quarkus app with endpoints using RESTEasy reactive using the
org.jboss.resteasy.reactive.ResponseStatus
annotation and a Jersey client is not working.Expected behavior
Can this be supported?
If yes, it would be nice if adding the Jersey client would not impact the quarkus part.
Actual behavior
When the endpoint is called:
How to Reproduce?
Step to reproduce:
resteasy-reactive
link on code.quarkus.io to create the project.@ResponseStatus(201)
on thehello
endpointorg.glassfish.jersey.core:jersey-common:3.1.3
dependency (in my real project I add a java REST client that has library as dependency)curl http://localhost:8080/hello
Output of
uname -a
orver
Output of
java -version
Quarkus version or git rev
3.3.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Additional information
Reproducer project https://github.com/jmini/quarkus-experiments/tree/main/quarkus_issue36024