Quarkus Rest Client永不超时

问题描述 投票:0回答:1

其余客户永不超时。在多个请求之后,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上进行了测试。

rest-client quarkus
1个回答
1
投票

几天前出现的0.27中已解决此问题

© www.soinside.com 2019 - 2024. All rights reserved.