You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
JDK 11 HttpClient integration with WebClient [SPR-16469] #21014
According to this blog post the HttpClient "handles request and response bodies as reactive-streams", and it is currently in incubation status, but will be made official in JDK 11 when it will switch to java.net from jdk.incubator.
Given the JDK 11 release dates, this is probably a 5.2 target. However, at present, we need to experiment with the proposed API to see if there any issues in adapting it through a ClientHttpConnector, and raise issues if necessary.
A draft prototype can be found at https://github.com/sdeleuze/jdk-http-webclient/.
It is using Reactor EmitterProcessor + Flow to RS passthrough bridge to adapt from Flow.subscriber to Flux.
Integration tests are all green even if more test is required.
To be discussed in our next reactive meeting
Our integration tests are all green with regular HTTP endpoints but not with streaming ones. I have sent a mail to the net-dev mailing list to describe the issue and get a feedback.
Leveraging a PublishingBodySubscriber copy from JDK-8201186, streaming tests pass as well.
Since this feature provides a Publisher based API and allows to have the lifecycle we were expecting (body available just after status and headers), I have added our +1 for this proposal on the mailing list in order to ask inclusion in JDK 11 out of the box.
I have upgraded the prototype to JDK 11 and Spring Framework 5.1, but it seems most tests are broken. Most significant change has been that we now leverage BodyPublishers.fromPublisher, so maybe the issue is on that part. I won't spend more time on that for now since this is not a Spring Framework 5.2 topic anymore, but we will have to fix that at some point.
Activity
spring-projects-issues commentedon Mar 29, 2018
Sébastien Deleuze commented
A draft prototype can be found at https://github.com/sdeleuze/jdk-http-webclient/.
It is using Reactor
EmitterProcessor+ Flow to RS passthrough bridge to adapt fromFlow.subscribertoFlux.Integration tests are all green even if more test is required.
To be discussed in our next reactive meeting
spring-projects-issues commentedon Apr 5, 2018
Sébastien Deleuze commented
Our integration tests are all green with regular HTTP endpoints but not with streaming ones. I have sent a mail to the net-dev mailing list to describe the issue and get a feedback.
spring-projects-issues commentedon Apr 5, 2018
Sébastien Deleuze commented
Leveraging a
PublishingBodySubscribercopy from JDK-8201186, streaming tests pass as well.Since this feature provides a
Publisherbased API and allows to have the lifecycle we were expecting (body available just after status and headers), I have added our +1 for this proposal on the mailing list in order to ask inclusion in JDK 11 out of the box.sdeleuze commentedon Jan 31, 2019
I have upgraded the prototype to JDK 11 and Spring Framework 5.1, but it seems most tests are broken. Most significant change has been that we now leverage
BodyPublishers.fromPublisher, so maybe the issue is on that part. I won't spend more time on that for now since this is not a Spring Framework 5.2 topic anymore, but we will have to fix that at some point.rstoyanchev commentedon Nov 8, 2019
I'm marking this superseded by #23432 which seems to be close enough to the prototype here.
JDK 11 HttpClient integration with WebClient
JDK HttpClient connector for WebClient