简体   繁体   English

我可以使用Spring 5 WebFlux WebClient使用非反应式REST API服务吗?

[英]Can I consume a non-reactive REST API service using the Spring 5 WebFlux WebClient?

I have a written a microservice using Spring 5 WebFlux and trying to consume a non-reactive REST API through it. 我有一个使用Spring 5 WebFlux编写的微服务,并尝试通过它使用非反应式REST API。 Is it possbile to consume a non-reactive service using a reactive webclient? 是否可以使用响应式webclient来使用非响应服务?

Yes, this is possible. 是的,这是可能的。 From the server's point of view, this is just a regular HTTP client. 从服务器的角度来看,这只是一个常规的HTTP客户端。 WebClient does support streaming and backpressure, but this doesn't change things at the HTTP level. WebClient确实支持流和背压,但这不会改变HTTP级别的内容。

The backpressure is dealt with at the TCP flow-control level, so the HTTP protocol stays the same. 背压在TCP流控制级别处理,因此HTTP协议保持不变。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用WebClient使用Reactive Spring Rest API - How to consume a Reactive Spring Rest API with WebClient 非反应式客户端 (RestTemplate) 是否可以使用反应式 REST API (WebFlux) - Is it possible for a non reactive Client (RestTemplate) to consume a Reactive REST API (WebFlux) 非反应式远程服务器的反应式WebClient - Reactive WebClient of non-reactive remote server 使用Spring Webflux Reactive WebClient设置连接超时 - Set connection timeout using Spring Webflux Reactive WebClient 使用 spring webflux WebClient 发现服务 - Service discovery with spring webflux WebClient 如何在非反应式 Spring EventListener 和反应式 Flux 之间架起桥梁 - How to bridge between a non-reactive Spring EventListener and a reactive Flux 如何在Spring Webflux中使用WebClient在Rest API中下载pdf文件 - How to use webclient in spring webflux to download pdf file in a rest api 我如何将 springboot 休息端点转换为 spring webflux 反应端点 - How can i turn springboot rest endpoints to spring webflux reactive endpoints 带有Kotlin功能路由器的非反应式Spring Web - Non-reactive Spring web with kotlin functional router 使用 Spring Reactive WebClient 对同一服务 API 进行多次调用的正确方法? - Correct way to do multiple calls to same service API using Spring Reactive WebClient?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM