Closed
Description
Context:
Using Spring Boot 3.2.4 with Spring WebFlux/GraphQL.
Server A exposes a graphqlSubscription, and Server B consumes the subscription. They both use the same components (reactor/netty).
Steps to Reproduce:
Client Sample:
// Initialize the webSocketGraphQlClient
ReactorNettyWebSocketClient reactorNettyWebSocketClient = new ReactorNettyWebSocketClient(HttpClient.create(), build);
WebSocketGraphQlClient.builder(webSocketGraphQlVideoServerUrl, reactorNettyWebSocketClient).build();
// Call sample
webSocketGraphQlClient
.document(query)
.retrieveSubscription(path)
.toEntity(XXXX.class)
.retryWhen(Retry.fixedDelay(5, Duration.ofMinutes(1))).blockLast()
Not Working Cases:
Case 1:
- Run the client.
- Wait for the first RETRY.
=> GraphQlTransportException => connection refused. - Run the server.
- KO -> the next retry will fail with the same reason.
Case 2:
- Run the server.
- Run the client.
- Shutdown the server.
- FIRST RETRY
=> WebSocketDisconnectedException -> connection is closed or lost. - Wait for the SECOND RETRY.
=> GraphQlTransportException => connection refused. - Run the server.
- KO -> the next retry will fail with the same reason.
Working Case:
- Run the server.
- Run the client.
- Shutdown the server.
- Wait for the FIRST RETRY.
=> WebSocketDisconnectedException -> connection is closed or lost. - Run the server.
- OK, the retry is working.
Is there a way to resume a WebSocket connection when the client failed to connect to the remote server?