apache/pulsar · error · IllegalArgumentException

Windowing is not supported in Go function yet

Error message

Windowing is not supported in Go function yet

What it means

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.

Source

Thrown at pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java:771

            throw new RuntimeException("Effectively-once processing guarantees not yet supported in Python");
        }

        if (functionConfig.getWindowConfig() != null) {
            throw new IllegalArgumentException("There is currently no support windowing in python");
        }

        if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {
            throw new IllegalArgumentException("Message retries not yet supported in python");
        }
    }

    private static void doGolangChecks(FunctionConfig functionConfig) {
        if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {
            throw new RuntimeException("Effectively-once processing guarantees not yet supported in Go function");
        }

        if (functionConfig.getWindowConfig() != null) {
            throw new IllegalArgumentException("Windowing is not supported in Go function yet");
        }

        if (functionConfig.getMaxMessageRetries() != null && functionConfig.getMaxMessageRetries() >= 0) {
            throw new IllegalArgumentException("Message retries not yet supported in Go function");
        }
    }

    private static void verifyNoTopicClash(Collection<String> inputTopics, String outputTopic)
            throws IllegalArgumentException {
        if (inputTopics.contains(outputTopic)) {
            throw new IllegalArgumentException(
                    String.format(
                            "Output topic %s is also being used as an input topic (topics must be one or the other)",
                            outputTopic));
        }
    }

    public static void doCommonChecks(FunctionConfig functionConfig) {

View on GitHub (pinned to 820761864e)

Solutions

  1. Remove the WindowConfig and process windows manually in the Go function (track event time, buffer, emit on watermark/interval)
  2. Implement windowed aggregation downstream using Pulsar IO or a Java windowed function
  3. Switch the function to the Java runtime, which supports windowing

Example fix

// before
FunctionConfig config = new FunctionConfig();
config.setRuntime(FunctionConfig.Runtime.GO);
config.setWindowConfig(WindowConfig.builder().windowLengthCount(100).build());

// after
FunctionConfig config = new FunctionConfig();
config.setRuntime(FunctionConfig.Runtime.GO);
config.setWindowConfig(null); // windowing unsupported in Go runtime
Defensive patterns

Strategy: validation

Validate before calling

if (config.getRuntime() == FunctionConfig.Runtime.GO
        && config.getWindowConfig() != null) {
    throw new IllegalArgumentException("Windowing is unsupported for Go functions");
}
FunctionConfigUtils.validateFunctionConfig(config, null);

Type guard

boolean goWindowingAllowed(FunctionConfig c) {
    return c.getRuntime() != FunctionConfig.Runtime.GO || c.getWindowConfig() == null;
}

Try / catch

try {
    FunctionConfigUtils.validateFunctionConfig(config, null);
} catch (IllegalArgumentException e) {
    if (e.getMessage() != null && e.getMessage().contains("Windowing is not supported in Go function")) {
        config.setWindowConfig(null); // strip windowing, handle windows in-function
    } else {
        throw e;
    }
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of apache/pulsar@820761864e (2026-09-06). Data as JSON: /api/errors/168ec1a17cc0025a. Report an issue: GitHub.