{"record":{"id":"c038013227116ce5","repo":"quarkusio/quarkus","slug":"too-many-functions-you-need-to-set-quarkus-funqy-c03801","errorCode":null,"errorMessage":"Too many functions.  You need to set quarkus.funqy.export","messagePattern":"Too many functions\\.  You need to set quarkus\\.funqy\\.export","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"extensions/funqy/funqy-google-cloud-functions/runtime/src/main/java/io/quarkus/funqy/gcp/functions/FunqyCloudFunctionsBindingRecorder.java","lineNumber":71,"sourceCode":"            }\n        }\n\n        FunctionConstructor.CONTAINER = bc;\n    }\n\n    public void chooseInvoker() {\n        // this is done at Runtime so that we can change it with an environment variable.\n        if (config.getValue().export().isPresent()) {\n            invoker = FunctionRecorder.registry.matchInvoker(config.getValue().export().get());\n            if (invoker == null) {\n                throw new RuntimeException(\n                        \"quarkus.funqy.export does not match a function: \" + config.getValue().export().get());\n            }\n        } else if (FunctionRecorder.registry.invokers().size() == 0) {\n            throw new RuntimeException(\"There are no functions to process lambda\");\n\n        } else if (FunctionRecorder.registry.invokers().size() > 1) {\n            throw new RuntimeException(\"Too many functions.  You need to set quarkus.funqy.export\");\n        } else {\n            invoker = FunctionRecorder.registry.invokers().iterator().next();\n        }\n        if (invoker.hasInput()) {\n            reader = (ObjectReader) invoker.getBindingContext().get(ObjectReader.class.getName());\n        }\n        if (invoker.hasOutput()) {\n            writer = (ObjectWriter) invoker.getBindingContext().get(ObjectWriter.class.getName());\n        }\n    }\n\n    /**\n     * Handle RawBackgroundFunction\n     *\n     * @param event\n     * @param context\n     */\n    public static void handle(String event, Context context) {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-google-cloud-functions/runtime/src/main/java/io/quarkus/funqy/gcp/functions/FunqyCloudFunctionsBindingRecorder.java#L53-L89","documentation":"Thrown by FunqyCloudFunctionsBindingRecorder.chooseInvoker at runtime when no quarkus.funqy.export is set and the Google Cloud Functions deployment contains more than one exported function. Google Cloud Functions invokes a single entry point per deployment, so exactly one function must be chosen; with multiple registered functions in FunctionRecorder.registry and no explicit export selector, the recorder cannot decide which invoker to bind and aborts startup.","triggerScenarios":"The application defines two or more @Funq methods without setting quarkus.funqy.export, so chooseInvoker cannot disambiguate.","commonSituations":"Adding a second funq method to a working single-function project; aggregating multiple function classes in one deployment without configuring the export.","solutions":["Set quarkus.funqy.export (or FUNQY_EXPORT env var in GCF) to the name of the function to expose","Deploy each function as a separate project/uber-jar","Reduce to a single @Funq method if one entry point is intended"],"exampleFix":"// before (application.properties)\n# no export set, multiple @Funq methods\n// after\nquarkus.funqy.export=myFunction","handlingStrategy":"validation","validationCode":"// count funq methods; if >1 set an export\ngrep -rn \"@Funq\" src/main/java | wc -l","typeGuard":null,"tryCatchPattern":"try {\n    binding.init();\n} catch (RuntimeException e) {\n    log.error(\"Multiple functions: set quarkus.funqy.export\", e);\n}","preventionTips":["Set quarkus.funqy.export whenever more than one @Funq method exists","Deploy one function per project for GCF","Review added functions when extending a deployment"],"tags":["configuration","google-cloud-functions","funqy","runtime"],"backgroundTag":"ambiguous-function-export","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"}