{"record":{"id":"aed608ca9ff00603","repo":"apache/pulsar","slug":"effectively-once-processing-guarantees-not-yet-sup","errorCode":null,"errorMessage":"Effectively-once processing guarantees not yet supported in Python","messagePattern":"Effectively-once processing guarantees not yet supported in Python","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java","lineNumber":753,"sourceCode":"            ValidatorUtils.validateSerde(functionConfig.getOutputSerdeClassName(), typeArgs[1],\n                    validatableFunctionPackage.getTypePool(), false);\n        }\n\n        if (functionConfig.getProducerConfig() != null\n                && functionConfig.getProducerConfig().getCryptoConfig() != null) {\n            ValidatorUtils\n                    .validateCryptoKeyReader(functionConfig.getProducerConfig().getCryptoConfig(),\n                            validatableFunctionPackage.getTypePool(), true);\n        }\n        return new FunctionConfigUtils.ExtractedFunctionDetails(\n                functionClassName,\n                typeArgs[0].asErasure().getTypeName(),\n                typeArgs[1].asErasure().getTypeName());\n    }\n\n    private static void doPythonChecks(FunctionConfig functionConfig) {\n        if (functionConfig.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) {\n            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\");","sourceCodeStart":735,"sourceCodeEnd":771,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-functions/utils/src/main/java/org/apache/pulsar/functions/utils/FunctionConfigUtils.java#L735-L771","documentation":"Python runtime functions do not support EFFECTIVELY_ONCE processing guarantees. doPythonChecks throws a RuntimeException when a function config targeting the Python runtime requests that guarantee level.","triggerScenarios":"Submitting a function with runtime PYTHON and setProcessingGuarantees(EFFECTIVELY_ONCE), e.g. copying a Java function's config to a Python function.","commonSituations":"Teams standardizing on effectively-once for all functions; YAML configs shared between Java and Python functions without adjusting the guarantee.","solutions":["Use ATMOST_ONCE or ATLEAST_ONCE for Python functions","Implement the function in Java if effectively-once is mandatory","Add application-level deduplication with ATLEAST_ONCE as a workaround"],"exampleFix":"// before\nconfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE); // python runtime\n// after\nconfig.setProcessingGuarantees(FunctionConfig.ProcessingGuarantees.ATLEAST_ONCE);","handlingStrategy":"validation","validationCode":"if (config.getRuntime() == FunctionConfig.Runtime.PYTHON && config.getProcessingGuarantees() == FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE) { throw new IllegalArgumentException(\"EFFECTIVELY_ONCE is unsupported for Python functions\"); }","typeGuard":"boolean pythonGuaranteeSupported(FunctionConfig c) { return c.getRuntime() != FunctionConfig.Runtime.PYTHON || c.getProcessingGuarantees() != FunctionConfig.ProcessingGuarantees.EFFECTIVELY_ONCE; }","tryCatchPattern":"try { ... } catch (RuntimeException e) { if (e.getMessage().contains(\"not yet supported in Python\")) { log.error(\"Use ATLEAST_ONCE or implement in Java\"); } }","preventionTips":["Map EFFECTIVELY_ONCE configs to Java runtime functions","Use ATLEAST_ONCE plus app-level dedup for Python","Document runtime/guarantee compatibility in team config templates"],"tags":["pulsar","functions","python","limitations"],"backgroundTag":"unsupported-runtime-feature","analyzedSha":"820761864ed8e2a7d2e52dd9763ad2ae117c1395","analyzedAt":"2026-09-06T00:14:20.138Z","contentChangedAt":"2026-09-06T00:14:20.138Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}