问题
If I understood correctly, HTTP endpoints implemented with Akka Streams apply backpressure to HTTP clients by not reading from the socket used for communicating with the client.
Is this also true for HTTP endpoints implemented with Spring's Functional Web Framework?
If not, how would I signal HTTP clients to slow down?
回答1:
Yes, Spring 5, with its Web Reactive module, implements the reactive streams spec with Reactor. Supporting backpressure is part of it.
Note that both the annotation-based and the functional flavors use the same infrastructure, only the programming model differs.
来源:https://stackoverflow.com/questions/41772711/backpressure-for-rest-endpoints-with-spring-functional-web-framework