javaquarkusquarkus-rest-clientquarkus-reactive

java.lang.IllegalStateException: Too many recursive interceptor actions after switching to quarkus-rest-client from quarkus-rest-reactive-client


This issue occured after switching from Quarkus 3.11.2 to 3.17.6 and from quarkus-rest-reactive-client to quarkus-rest-client.

My quarkus app builds successfully but i get the aforementioned error after it starts.

//application.properties

quarkus.rest-client.comment-reactive-client.url=http://localhost:8084

//Rest client Interface
import io.smallrye.mutiny.Uni;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

import java.util.List;

@Path("/v1/db/comments")
@RegisterRestClient(configKey = "comment-reactive-client")
public interface CommentReactiveRestClient {
    @GET
    Uni<List<Comment>> getComments();
}

//Quarkus Resource
@Inject
@RestClient
CommentReactiveRestClient commentReactiveRestClient;

@GET
Path("/api/comments")
public Multi<Comment> apiCall() {
    return commentReactiveRestClient.getComments().onItem().transformToMulti(list -> Multi.createFrom().iterable(list));
}

I am certain the new quarkus-rest-client causes this issue because i did not have this problem with the quarkus-rest-reactive-client


Solution

  • This was a bug in Quarkus that has since been fixed: https://github.com/quarkusio/quarkus/pull/45716

    The fix should be available in Quarkus 3.18.0