Closed pjgg closed 11 months ago
@asoldano is HTTP 2 supported by the RESTEasy REST client? And if not, is there any plan to support it?
@ronsigal ^
It looks like we would have to upgrade to HttpClient 5.0. I don't know yet what the implications would be, but I think it's a great idea.
JIRAs with tentative Fix Versions:
@michalszynkiewicz does the Reactive REST Client support HTTP 2 ?
Vert.x HTTP Client supports http/2. HTTPClientOptions don't have a setting for enabling http/2 so I guess rest client reactive should just use it if available but I never tested it.
I was wrong, there is an option to specify HTTP/2, you do it with HTTPClientOptions#setProtocolVersion(HttpVersion.HTTP_2)
.
Interesting, I wonder if we should expose it
I think it would be good to do so
Is there a way to manually enable this on Quarkus 2.x services before it's exposed by Quarkus directly? Adding HTTP/2 support would be a great improvement to improve efficiency of high throughput API integrations. Calling other HTTP services is presumably something that most Quarkus services do.
Partial fix to give support in REST Client Reactive: https://github.com/quarkusio/quarkus/pull/31192
I would rather not have complex things like multiple client implementations. We already have 2 (classic and reactive), and it's hard to keep an eye on everything.
The reactive rest client supports HTTP/2, so closing this issue is recommended.
Description Quarkus httpClient (quarkus-rest-client) should be able to works over
http/2
as the server-side does. Otherwise, if we usequarkus-rest-client
for example to exchange data between microservices, then the server(even if is able to talk onHttp/2
) will talk on the same protocol as the client libraries (Http1.1
).Implementation ideas
Well, I will try to support several clients over the same interface (
StrategyPattern
). Soquarkus-rest-client
must be just the common interface of several HttpClient as ...VertxHttpClient
(that supportsHttp/2
),OkHttp3
,ApacheHttpClient
...etc And then depends on your configuration, you should have some specificapplication.properties
.Example: Lets add the proposal common HttpClient interface
quarkus-rest-client
and an implementationinterface smallrye-mutiny-vertx-web-client
Dependencies:
application.properties
Thank U!.
External references:
Jira Issue