OpenFeign / feign

Feign makes writing java http clients easier
Apache License 2.0
9.51k stars 1.93k forks source link

How to use AsyncCient for non blocking requests? #2374

Open gfmota opened 7 months ago

gfmota commented 7 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 7 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 5 months ago

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

velo commented 5 months ago

Unstable API signature

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

kdavisk6 commented 2 months ago

@gfmota is there anything else we can help you with? If you are satisfied with our response, please let us know and close this issue. Thanks!