{"record":{"id":"3bc7158372ce17ee","repo":"quarkusio/quarkus","slug":"blocking-referred-to-invalid-worker-name-worke","errorCode":null,"errorMessage":"@Blocking referred to invalid worker name. ${workerName}","messagePattern":"@Blocking referred to invalid worker name\\. (.+?)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/QuarkusWorkerPoolRegistry.java","lineNumber":265,"sourceCode":"                    if (executor == null) {\n                        WorkerPoolConfig config = workerConfig.get(workerName);\n                        executor = executionHolder.vertx().createSharedWorkerExecutor(workerName,\n                                config.maxConcurrency());\n                        log.infof(\"Created worker pool named %s with concurrency of %d\", workerName,\n                                config.maxConcurrency());\n                        workerExecutors.put(workerName, executor);\n                    }\n                }\n            }\n            if (executor != null) {\n                return executor;\n            } else {\n                throw new RuntimeException(\"Failed to create Worker for \" + workerName);\n            }\n        }\n\n        // Shouldn't get here\n        throw new IllegalArgumentException(\"@Blocking referred to invalid worker name. \" + workerName);\n    }\n\n    public void defineWorker(String className, String method, String poolName, boolean virtualThread) {\n        Objects.requireNonNull(className, \"className was empty\");\n        Objects.requireNonNull(method, \"Method was empty\");\n        if (virtualThread) {\n            virtualThreadWorkers.add(poolName);\n            return;\n        }\n\n        if (!poolName.equals(Blocking.DEFAULT_WORKER_POOL)) {\n            // Validate @Blocking value is not empty, if set\n            if (Validation.isBlank(poolName)) {\n                throw getBlockingError(className, method, \"value is blank or null\");\n            }\n\n            Config config = ConfigProvider.getConfig();\n            // Validate @Blocking worker pool has configuration to define concurrency","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/smallrye-reactive-messaging/runtime/src/main/java/io/quarkus/smallrye/reactivemessaging/runtime/QuarkusWorkerPoolRegistry.java#L247-L283","documentation":"@Blocking can name a specific worker pool, e.g. @Blocking(\"poolName\"). If getWorker falls through — the named worker is neither a predefined executor nor a successfully created one — it throws IllegalArgumentException saying the annotation referred to an invalid worker name.","triggerScenarios":"@Blocking(\"someName\") where 'someName' was never registered via defineWorker (deployment didn't create a matching @Blocking-annotated method pool) and no default executor matches.","commonSituations":"Typo in the @Blocking value; renaming the annotated method/pool in one place but not the other; using @Blocking(\"x\") in a library where x is defined by an absent extension.","solutions":["Fix the name in @Blocking to match an existing/defined worker pool.","Use plain @Blocking to fall back to the default worker pool.","Ensure the class/method carrying the pool definition still exists (it defines the pool named after the class+method).","Check that generated defineWorker calls weren't skipped (e.g. wrong package/exclusion)."],"exampleFix":"// before\n@Blocking(\"emial-pool\")\nvoid consume(String m) { ... }\n// after\n@Blocking(\"email-pool\")\nvoid consume(String m) { ... }","handlingStrategy":"validation","validationCode":"// Before using a named pool, verify a matching @Blocking method defines it:\n// grep -rn 'void .*' src/main/java --include='*.java' | grep -B1 '<MethodSignature>'\n// or ensure the name matches the defining class/method convention.","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep pool names in shared constants referenced by both definition and @Blocking usage.","Prefer plain @Blocking (default pool) when a named pool isn't strictly required.","After renames, grep for the old pool name across the codebase."],"tags":["quarkus","reactive-messaging","worker-pool","blocking","naming"],"backgroundTag":"invalid-worker-name","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"}