quarkusio/quarkus · error · RuntimeException

Too many functions. You need to set quarkus.funqy.export

Error message

Too many functions.  You need to set quarkus.funqy.export

What it means

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.

Source

Thrown at extensions/funqy/funqy-google-cloud-functions/runtime/src/main/java/io/quarkus/funqy/gcp/functions/FunqyCloudFunctionsBindingRecorder.java:71

            }
        }

        FunctionConstructor.CONTAINER = bc;
    }

    public void chooseInvoker() {
        // this is done at Runtime so that we can change it with an environment variable.
        if (config.getValue().export().isPresent()) {
            invoker = FunctionRecorder.registry.matchInvoker(config.getValue().export().get());
            if (invoker == null) {
                throw new RuntimeException(
                        "quarkus.funqy.export does not match a function: " + config.getValue().export().get());
            }
        } else if (FunctionRecorder.registry.invokers().size() == 0) {
            throw new RuntimeException("There are no functions to process lambda");

        } else if (FunctionRecorder.registry.invokers().size() > 1) {
            throw new RuntimeException("Too many functions.  You need to set quarkus.funqy.export");
        } else {
            invoker = FunctionRecorder.registry.invokers().iterator().next();
        }
        if (invoker.hasInput()) {
            reader = (ObjectReader) invoker.getBindingContext().get(ObjectReader.class.getName());
        }
        if (invoker.hasOutput()) {
            writer = (ObjectWriter) invoker.getBindingContext().get(ObjectWriter.class.getName());
        }
    }

    /**
     * Handle RawBackgroundFunction
     *
     * @param event
     * @param context
     */
    public static void handle(String event, Context context) {

View on GitHub (pinned to e1c734241f)

Solutions

  1. Set quarkus.funqy.export (or FUNQY_EXPORT env var in GCF) to the name of the function to expose
  2. Deploy each function as a separate project/uber-jar
  3. Reduce to a single @Funq method if one entry point is intended

Example fix

// before (application.properties)
# no export set, multiple @Funq methods
// after
quarkus.funqy.export=myFunction
Defensive patterns

Strategy: validation

Validate before calling

// count funq methods; if >1 set an export
grep -rn "@Funq" src/main/java | wc -l

Try / catch

try {
    binding.init();
} catch (RuntimeException e) {
    log.error("Multiple functions: set quarkus.funqy.export", e);
}

Prevention

When it happens

Trigger: The application defines two or more @Funq methods without setting quarkus.funqy.export, so chooseInvoker cannot disambiguate.

Common situations: Adding a second funq method to a working single-function project; aggregating multiple function classes in one deployment without configuring the export.

Related errors


AI-assisted analysis of quarkusio/quarkus@e1c734241f (2026-09-05). Data as JSON: /api/errors/c038013227116ce5. Report an issue: GitHub.