{"record":{"id":"b44ec403e9f30ba0","repo":"quarkusio/quarkus","slug":"too-many-functions-you-need-to-set-quarkus-funqy","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-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/FunqyLambdaBindingRecorder.java","lineNumber":98,"sourceCode":"                ObjectWriter writer = objectMapper.writerFor(javaOutputType);\n                invoker.getBindingContext().put(ObjectWriter.class.getName(), writer);\n            }\n        }\n    }\n\n    public void chooseInvoker() {\n        // this is done at Runtime so that we can change it with an environment variable.\n        if (runtimeConfig.getValue().export().isPresent()) {\n            invoker = FunctionRecorder.registry.matchInvoker(runtimeConfig.getValue().export().get());\n            if (invoker == null) {\n                throw new RuntimeException(\n                        \"quarkus.funqy.export does not match a function: \" + runtimeConfig.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\n        ObjectReader objectReader = null;\n        if (invoker.hasInput()) {\n            objectReader = (ObjectReader) invoker.getBindingContext().get(ObjectReader.class.getName());\n\n            if (amazonBuildTimeConfig.advancedEventHandling().enabled()) {\n                // We create a copy, because the mapper will be reconfigured for the advanced event handling,\n                // and we do not want to adjust the ObjectMapper, which is available in arc context.\n                JsonMapper jsonMapper = AmazonLambdaMapperRecorder.objectMapper;\n                JsonMapper.Builder builder = jsonMapper.rebuild();\n                reader = new AwsEventInputReader(builder, objectReader, amazonBuildTimeConfig);\n            } else {\n                reader = new JacksonInputReader(objectReader);\n            }\n","sourceCodeStart":80,"sourceCodeEnd":116,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/funqy/funqy-amazon-lambda/runtime/src/main/java/io/quarkus/funqy/lambda/FunqyLambdaBindingRecorder.java#L80-L116","documentation":"When multiple Funqy functions are registered and no quarkus.funqy.export is configured, the Lambda binding cannot determine which function to invoke, so it throws this RuntimeException instructing you to set the export property.","triggerScenarios":"Application registers two or more @Funq functions and quarkus.funqy.export is absent (or not settable via the Lambda environment) at runtime.","commonSituations":"Added a second @Funq method to an app that previously had one; merged codebases each with their own function; export env var accidentally removed from the Lambda configuration.","solutions":["Set quarkus.funqy.export (or FUNQY_EXPORT env var in the Lambda console) to the name of the function to invoke","Keep only one @Funq function in the deployment if a single handler is intended","Split functions across separate Lambda deployments"],"exampleFix":"// before\n# two @Funq methods, no export\n// after\nquarkus.funqy.export=processOrder","handlingStrategy":"validation","validationCode":"if (registeredFunctionNames.size() > 1 && System.getenv(\"QUARKUS_FUNQY_EXPORT\") == null) {\n    throw new IllegalStateException(\"Multiple @Funq functions; set quarkus.funqy.export\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set quarkus.funqy.export as soon as a second function is added","Prefer one function per Lambda deployment","Audit @Funq usage after merges and refactorings"],"tags":["funqy","aws-lambda","configuration","ambiguity"],"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"}