2

For Spring Boot based microservices communicating with each other via load-balanced clients (with Spring Cloud LoadBalancer) which client should be used, WebClient or OpenFeign?

From what I’ve read they both support Spring Cloud LoadBalancer. I know that WebClient also supports reactive, but that is not a feature we need.

Are both clients going to continue to be supported by Spring for the foreseeable future?

From what I can see Spring seems to be pushing WebClient. However, I still see development activity going on in the spring-cloud-openfeign github repo.

OpenFeign seems to be an easier/cleaner to use way of creating the clients, but are there any drawbacks compared to WebClient?

  • 3
    They are different styles of client. WebClient is part of spring framework proper. Spring Cloud OpenFeign is customization of the OpenFeign project. Both will be supported for a long time. WebClient is a fluid interface, OpenFeign is a declarative one. WebClient is non-blocking IO and OpenFeign is blocking IO – spencergibb Nov 10 '21 at 03:28

0 Answers0