Spring Cloud Feign Non blocking I/O or Asynchronous Call

Debopam picture Debopam · Jun 12, 2017 · Viewed 12.9k times · Source

I am developing microservices using Spring cloud platform where service1 calls multiple other micro services e.g. service2, service3, service 4 etc. These services can be called in parallel and service1 will aggregate the result. Can I use Spring cloud feign (http://cloud.spring.io/spring-cloud-static/Dalston.SR1/#spring-cloud-feign) to generate rest client and call the services asynchronously or Should I use Spring 4 AsyncRestTemplate to call the services asynchronously?

Answer

Rajesh Yerur picture Rajesh Yerur · Jul 9, 2018

I have used CompletableFuture to chain async calls to mutiple micro services using feign client however was not eventually successful. Please go through below link for further information. What I understood is - Feign's is not designed for asynchronous invocation or zero-copy i/o.

https://github.com/OpenFeign/feign/issues/361