简体   繁体   English

Spring 响应式 Web 客户端超时

[英]Spring reactive Webclient timeout

I was trying to test the default timeout of Spring reactive Webclient .我试图测试 Spring 反应式 Webclient 的默认超时。 For that purpose I created a rest endpoint that takes 10 hours to return a response.为此,我创建了一个需要 10 小时才能返回响应的休息端点。

I created a rest client using spring reactive Webclient.我使用 spring 反应式 Webclient 创建了一个休息客户端。 But I see that the spring Reactive Webclient keeps waiting for 10 hours.但是我看到 spring Reactive Webclient 一直在等待 10 个小时。

Doesn't spring reactive Webclient has any default timeout? spring 反应式 Webclient 没有任何默认超时吗?

If you are using Reactor Netty as HTTP client library which is default using Spring WebFlux there is no default response timeout specified.如果您使用 Reactor Netty 作为默认使用 Spring WebFlux 的 HTTP 客户端库,则没有指定默认响应超时。 If you would like to configure timeout settings there are multiple options as described in the Projectreactor reference documentation chapter 6.14 .如果您想配置超时设置,有多个选项,如Projectreactor 参考文档第 6.14 章所述

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM