I found that in the package io.modelcontextprotocol.client.transport, WebFluxSseClientTransport supports a custom inboundRetryHandler. Are there any official examples?
public WebFluxSseClientTransport(WebClient.Builder webClientBuilder, ObjectMapper objectMapper, String sseEndpoint) {
this.isClosing = false;
this.messageEndpointSink = Sinks.one();
this.inboundRetryHandler = (retrySpec, sink) -> {
if (this.isClosing) {
logger.debug("SSE connection closed during shutdown");
sink.error(retrySpec.failure());
} else if (retrySpec.failure() instanceof IOException) {
logger.debug("Retrying SSE connection after IO error");
sink.next(retrySpec);
} else {
logger.error("Fatal SSE error, not retrying: {}", retrySpec.failure().getMessage());
sink.error(retrySpec.failure());
}
};
Assert.notNull(objectMapper, "ObjectMapper must not be null");
Assert.notNull(webClientBuilder, "WebClient.Builder must not be null");
Assert.hasText(sseEndpoint, "SSE endpoint must not be null or empty");
this.objectMapper = objectMapper;
this.webClient = webClientBuilder.build();
this.sseEndpoint = sseEndpoint;
}