spring-cloudresttemplatespring-webclientopenfeign

Communication between Microservices: Spring cloud OpenFeign vs WebClient/RestTemplate


Any idea please about the best way to use for back to back communication ?

spring cloud OpenFeign or WebClient/RestTemplate ?

I think Feign client should be used when spring cloud gateway need to

communicate to other microservices, whereas WebClient/RestTemplate should be used for back to back communication.

Am I wrong ?


Solution

  • WebClient (RestTemplate - deprecated to support WebClient)

    OpenFeign