OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.42k stars 1.92k forks source link

How to use AsyncCient for non blocking requests? #2374

Open gfmota opened 5 months ago

gfmota commented 5 months ago

I have a code where I have multiple @FeignClients and now we are having performance problems that could be solved by parallel requests. I saw that since 11.7 the AsyncClient allows to make non blocking requests, but I haven't found any documentation or usage example out on the internet. How exactly would you recommend to migrate FeignClient to AsyncClient? Do I need to use any other library to make it possible?

gromspys commented 5 months ago

You can find documentation here: https://github.com/OpenFeign/feign?tab=readme-ov-file#async-execution-via-completablefuture Also there is a library for reactive code: https://github.com/PlaytikaOSS/feign-reactive

predatoralpha commented 3 months ago

Hello! I can see @Experimental annotation for interface AsyncClient. Is AsyncFeign only for fan or it used in productions servers?

velo commented 3 months ago

Unstable API signature

https://github.com/OpenFeign/feign/blob/a2602bf0088e789aa4806801ceb215a2b3a135b3/core/src/main/java/feign/Experimental.java#L20