The rest client never times out. After multiple requests, quarkus stops serving new requests. Also tried .../mp-rest/connectTimeout=5000 .../mp-rest/readTimeout=5000 but with no luck.
The interface looks like
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();
}
the service like
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();
    }
}
and the application.properties file like
org.acme.ExampleClient/mp-rest/url=http://localhost:8081
org.acme.ExampleClient/mp-rest/connectTimeout=5000
org.acme.ExampleClient/mp-rest/readTimeout=5000
In order to test, call http://localhost:8080/hello and point localhost:8081 to a service in debug mode with a breakpoint.
I have tested on quarkus 0.22 and 0.23.2.
This problem is now resolved in 0.27 that came out a couple of days ago
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With