4

I have spring reactive a micro-service which call another micro-service to get list of products, but it keep failing with the error

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed DURING response
    Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Assembly trace from producer [reactor.core.publisher.FluxLift] :

This is how i get WebClient object

public WebClient createWebClient(HttpRequestConfig config, String baseUri) {
    Builder clientBuilder = webClientBuilder(config)
             .clientConnector(new ReactorClientHttpConnector(HttpClient.newConnection().compress(true)))
            .baseUrl(baseUri);
    return clientBuilder.build();
}

Any idea about the issue?

Melad Basilius
  • 3,847
  • 10
  • 44
  • 81

0 Answers0