{"record":{"id":"168ec1a17cc0025a","repo":"apache/pulsar","slug":"windowing-is-not-supported-in-go-function-yet","errorCode":null,"errorMessage":"Windowing is not supported in Go function yet","messagePattern":"Windowing is not supported in Go function yet","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java","lineNumber":771,"sourceCode":"            throw new RuntimeException(\"Effectively-once processing guarantees not yet supported in Python\");\n        }\n\n        if (functionConfig.getWindowConfig() != null) {\n            throw new IllegalArgumentException(\"There is currently no support windowing in python\");\n        }\n\n        if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {\n            throw new IllegalArgumentException(\"Message retries not yet supported in python\");\n        }\n    }\n\n    private static void doGolangChecks(FunctionConfig functionConfig) {\n        if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {\n            throw new RuntimeException(\"Effectively-once processing guarantees not yet supported in Go function\");\n        }\n\n        if (functionConfig.getWindowConfig() != null) {\n            throw new IllegalArgumentException(\"Windowing is not supported in Go function yet\");\n        }\n\n        if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {\n            throw new IllegalArgumentException(\"Message retries not yet supported in Go function\");\n        }\n    }\n\n    private static void verifyNoTopicClash(Collection<String> inputTopics, String outputTopic)\n            throws IllegalArgumentException {\n        if (inputTopics.contains(outputTopic)) {\n            throw new IllegalArgumentException(\n                    String.format(\n                            \"Output topic %s is also being used as an input topic (topics must be one or the other)\",\n                            outputTopic));\n        }\n    }\n\n    public static void doCommonChecks(FunctionConfig functionConfig) {","sourceCodeStart":753,"sourceCodeEnd":789,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java#L753-L789","documentation":"Windowing (WindowConfig) is only implemented for the Java function runtime; doGolangChecks rejects any Go function config that sets a window configuration. The check prevents deploying a Go function whose windowed processing would never run.","triggerScenarios":"Creating or updating a Go function with setWindowConfig(WindowConfig) non-null (e.g. pulsar-admin functions create --go ... --window-config / window functions API), routed through validateNonJavaFunction -> doGolangChecks.","commonSituations":"Converting a Java windowed function to Go assuming feature parity; aggregations over tumbling/sliding windows implemented in Go; docs or examples mixing windowing with the Go runtime.","solutions":["Remove the WindowConfig and process windows manually in the Go function (track event time, buffer, emit on watermark/interval)","Implement windowed aggregation downstream using Pulsar IO or a Java windowed function","Switch the function to the Java runtime, which supports windowing"],"exampleFix":"// before\nFunctionConfig config = new FunctionConfig();\nconfig.setRuntime(FunctionConfig.Runtime.GO);\nconfig.setWindowConfig(WindowConfig.builder().windowLengthCount(100).build());\n\n// after\nFunctionConfig config = new FunctionConfig();\nconfig.setRuntime(FunctionConfig.Runtime.GO);\nconfig.setWindowConfig(null); // windowing unsupported in Go runtime","handlingStrategy":"validation","validationCode":"if (config.getRuntime() == FunctionConfig.Runtime.GO\n        && config.getWindowConfig() != null) {\n    throw new IllegalArgumentException(\"Windowing is unsupported for Go functions\");\n}\nFunctionConfigUtils.validateFunctionConfig(config, null);","typeGuard":"boolean goWindowingAllowed(FunctionConfig c) {\n    return c.getRuntime() != FunctionConfig.Runtime.GO || c.getWindowConfig() == null;\n}","tryCatchPattern":"try {\n    FunctionConfigUtils.validateFunctionConfig(config, null);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage() != null && e.getMessage().contains(\"Windowing is not supported in Go function\")) {\n        config.setWindowConfig(null); // strip windowing, handle windows in-function\n    } else {\n        throw e;\n    }\n}","preventionTips":["Only configure WindowConfig for Java-runtime functions","When porting windowed Java functions to Go, plan a manual windowing design first","Run config validation (validateFunctionConfig) in CI before deployment","Track Pulsar release notes for Go-runtime windowing support before adopting it"],"tags":["pulsar-functions","go-runtime","windowing","unsupported-feature"],"backgroundTag":"unsupported-feature-for-runtime","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}