{"record":{"id":"d8d217234fe145f6","repo":"quarkusio/quarkus","slug":"specifying-executor-service-is-not-supported-the","errorCode":null,"errorMessage":"Specifying executor service is not supported. The underlying call is non-blocking, there is no reason to offload the call to a separate thread pool.","messagePattern":"Specifying executor service is not supported\\. The underlying call is non-blocking, there is no reason to offload the call to a separate thread pool\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientBuilderImpl.java","lineNumber":362,"sourceCode":"\n    @Override\n    public RestClientBuilderImpl httpClientOptionsCustomizer(Consumer<HttpClientOptions> httpClientOptionsCustomizer) {\n        return clientOptionsCustomizer(httpClientOptionsCustomizer);\n    }\n\n    public RestClientBuilderImpl clientRequestCustomizer(Consumer<HttpClientRequest> clientRequestCustomizer) {\n        clientBuilder.clientRequestCustomizer(clientRequestCustomizer);\n        return this;\n    }\n\n    @Override\n    public RestClientBuilderImpl httpClientRequestCustomizer(Consumer<HttpClientRequest> httpClientOptionsCustomizer) {\n        return clientRequestCustomizer(httpClientOptionsCustomizer);\n    }\n\n    @Override\n    public RestClientBuilderImpl executorService(ExecutorService executor) {\n        throw new IllegalArgumentException(\"Specifying executor service is not supported. \" +\n                \"The underlying call is non-blocking, \" +\n                \"there is no reason to offload the call to a separate thread pool.\");\n    }\n\n    @Override\n    public Configuration getConfiguration() {\n        return clientBuilder.getConfiguration();\n    }\n\n    @Override\n    public RestClientBuilderImpl property(String name, Object value) {\n        clientBuilder.property(name, value);\n        return this;\n    }\n\n    @Override\n    public RestClientBuilderImpl register(Class<?> componentClass) {\n        Object bean = BeanGrabber.getBeanIfDefined(componentClass);","sourceCodeStart":344,"sourceCodeEnd":380,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/resteasy-reactive/rest-client/runtime/src/main/java/io/quarkus/rest/client/reactive/runtime/RestClientBuilderImpl.java#L344-L380","documentation":"The MicroProfile REST Client spec allows executorService(ExecutorService) to offload blocking calls, but Quarkus' reactive rest client is fully non-blocking (Vert.x event loop based), so there is nothing to offload. RestClientBuilderImpl.executorService therefore unconditionally throws IllegalArgumentException. It is a deliberate, always-failing API for this implementation.","triggerScenarios":"Calling builder.executorService(anyExecutorService) on a QuarkusRestClientBuilder (usually in code shared between the MP REST Client implementation and Quarkus).","commonSituations":"Porting existing MicroProfile REST Client code from another vendor (e.g. a Jersey-based stack) to Quarkus; generic builder helper utilities that set executor services speculatively.","solutions":["Remove the executorService(...) call entirely — the reactive client never blocks.","If thread offloading is truly required, wrap the reactive call with @Blocking on a service layer or use Mutiny's runSubscriptionOn instead.","Guard shared code so executorService is only invoked on non-Quarkus builders."],"exampleFix":"// before\nbuilder.executorService(myExecutor);\n\n// after\n// removed: Quarkus reactive client is non-blocking; no executor needed\nbuilder.build(MyClient.class);","handlingStrategy":"type-guard","validationCode":"if (builder instanceof io.quarkus.rest.client.reactive.QuarkusRestClientBuilder) {\n    // skip executorService call\n}","typeGuard":"boolean supportsExecutorService(RestClientBuilder b) { return !(b instanceof io.quarkus.rest.client.reactive.runtime.RestClientBuilderImpl); }","tryCatchPattern":"try {\n    builder.executorService(exec);\n} catch (IllegalArgumentException e) {\n    // Quarkus reactive client: non-blocking, executor unsupported — ignore\n}","preventionTips":["Never call executorService on Quarkus rest client builders.","Keep executor configuration in vendor-specific code paths, guarded by instanceof checks.","Use @Blocking or Mutiny operators when thread offloading is needed."],"tags":["rest-client","quarkus","reactive","unsupported-operation"],"backgroundTag":"unsupported-operation","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}