其余客户永远不会超时。在多个请求之后,quarkus停止提供新请求。 也尝试过 ... / mp-rest / connectTimeout = 5000 ... / mp-rest / readTimeout = 5000 但没有运气。
界面看起来像
package org.acme;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
@RegisterRestClient
public interface ExampleClient {
@GET
@Path("/test")
String test();
}
类似的服务
package org.acme;
import org.eclipse.microprofile.rest.client.inject.RestClient;
import javax.inject.Inject;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Path("/hello")
public class ExampleResource {
@Inject
@RestClient
ExampleClient exampleClient;
@GET
@Produces(MediaType.TEXT_PLAIN)
public String hello() {
return exampleClient.test();
}
}
和application.properties文件,例如
org.acme.ExampleClient/mp-rest/url=http://localhost:8081
org.acme.ExampleClient/mp-rest/connectTimeout=5000
org.acme.ExampleClient/mp-rest/readTimeout=5000
为了进行测试,请调用http://localhost:8080/hello并将localhost:8081指向带有断点的调试模式下的服务。
我已经在quarkus 0.22和0.23.2上进行了测试。
答案 0 :(得分:1)
此问题已在几天前发布的0.27中解决