Backpressure for REST endpoints with Spring Functional Web Framework

家住魔仙堡 提交于 2019-12-12 23:33:22

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!