Add a JDK HttpClient WebSocket client for WebFlux - #37260
Open
goutamadwant wants to merge 1 commit into
Open
Conversation
Implement reactive JDK WebSocket sessions with bounded incoming messages, demand-driven callbacks, and cancellation cleanup. Cover client and session lifecycle behavior and extend the shared WebSocket integration tests and reference documentation. Closes spring-projectsgh-21016 Signed-off-by: Goutam Adwant <workwithgoutam@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #21016.
Add
JdkWebSocketClientand its session adapter so WebFlux applications canuse the JDK
HttpClientwithout an additional WebSocket client library.The adapter maps reactive demand to native callbacks, bounds incoming fragment
aggregation, and serializes outgoing messages. Tests cover handshake ordering,
cancellation, close and error handling, and pooled-buffer ownership. The existing
client/server integration matrix now includes the JDK client and binary echo.
Document configuration and JDK API constraints, including unavailable successful
handshake response headers and demand-driven remote close notifications.
Validation:
:spring-webflux:checkand:spring-webflux:javadocpassed with--no-build-cache --rerun-tasks. The module suite reported 2,596 passed,9 skipped, and no failures, including all 147 focused client, session, and
integration tests.
./gradlew antoraalso passed, with the updated localdocumentation verified in the rendered output.