Comments (13)
from feign.
from feign.
That makes sense, with IncrementalCallback
we can support both blocking and non-blocking IO.
from feign.
Is there a reason to keep the synchronous method?
// existing
Response execute(Request request, Options options) throws IOException;
from feign.
yes because most api interactions with http are still synchronous and we
don't want to or need to eliminate "easy mode" just to facilitate advanced.
from feign.
for example, implementing Client with url connection (a synchronous client) could reuse a base implementation of forking off the request. I've in the past made the mistake of forcing synchronous http calls through blocking futures (jclouds), and don't want to repeat that as a default, particularly as it would require sync calls to unnecessarily fire threads.
Having an interface that supports both means allows folks to decide at configuration time how they prefer to interact, whether that's making everything block on futures, use real async tasks or use async only when asked.
from feign.
Any update on this? Are you still planning to integrate this in a future release?
Thanks.
from feign.
Please implement support for async, it's a pretty big drawback right now when your client and MVC controller can't share the same contract because of the use of (for example) DeferredResult
.
from feign.
DeferredResult is a spring MVC type, right? If that's the goal, maybe
raise an issue in spring-cloud-netflix where the MVC contract lives?
from feign.
@adriancole Yes, it is a spring MVC type, however, if the underlying implementation doesn't support async I don't see how spring-cloud-netflix
would be able to solve the problem. I will take your suggestion and raise an issue there, though, in the hopes that maybe there is a workaround. Thanks for the quick response!
from feign.
+1. It's quite strange that popular general purpose HTTP client doesn't support async.
from feign.
from feign.
I see. Actually planning to use Hystrix w/ Rx. However what concerns me is the lack of non-blocking client support. Maybe I'm missing something, but it seems that Feign uses either Apache HttpClient or OkHttp - both in blocking mode? Was hoping that Async HttpClient would allow me to do non-blocking requests.
from feign.
Related Issues (20)
- Feign does not proxy the methods inherited from interface if there are manually added ones
- HC5 client can't send compressed POST requests HOT 1
- Documentation for the metrics reported to micrometer when using MicrometerCapability HOT 5
- Feign.Builder have a requestInterceptor bug HOT 2
- RetryableException should hold the methodKey as well
- Can't set request header in json format HOT 5
- after upgrade version from springboot 3.1.6 to 3.2.0 can not start HOT 1
- Performance discussion about default openfeign client HOT 6
- Noop Hostname Verifier option does not appear to work with Java 21
- Bug:ConcurrentModificationException at feign.SynchronousMethodHandler.targetRequest(SynchronousMethodHandler.java:162)
- Error in RequestTemplate#uri when there're both query and fragment
- Error in Expressions.PathStyleExpression#getValue
- @GetMapping Required String parameter is not present HOT 3
- JacksonJrDecoder is not able to deserialize generics
- feign.jackson.jr.JacksonJrDecoder#findTransformer is not extendable
- [Feature Request] Support custom tags for Dropwizard metrics
- Unexpected FeignException instead of ResponseEntity when the server returns 401 HOT 1
- Response.protocolVersoin may be null causing NPEs
- feign-micrometer: spanId/parentId information lost HOT 2
- Breaking change with Alpha version of OkHttp3 Library HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from feign.