{"record":{"id":"0623aa2f4732c43b","repo":"apache/pulsar","slug":"go-instance-current-not-support-effectively-once-p","errorCode":null,"errorMessage":"Go instance current not support EFFECTIVELY_ONCE processing guarantees.","messagePattern":"Go instance current not support EFFECTIVELY_ONCE processing guarantees\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pulsar-function-go/pf/instanceConf.go","lineNumber":138,"sourceCode":"\t\t},\n\t\tauthPlugin:              cfg.ClientAuthenticationPlugin,\n\t\tauthParams:              cfg.ClientAuthenticationParameters,\n\t\ttlsTrustCertsPath:       cfg.TLSTrustCertsFilePath,\n\t\ttlsAllowInsecure:        cfg.TLSAllowInsecureConnection,\n\t\ttlsHostnameVerification: cfg.TLSHostnameVerificationEnable,\n\t}\n\t// parse the raw function details and ignore the unmarshal error(fallback to original way)\n\tif cfg.FunctionDetails != \"\" {\n\t\tfunctionDetails := pb.FunctionDetails{}\n\t\tif err := protojson.Unmarshal([]byte(cfg.FunctionDetails), &functionDetails); err != nil {\n\t\t\tlog.Errorf(\"Failed to unmarshal function details: %v\", err)\n\t\t} else {\n\t\t\tinstanceConf.funcDetails = functionDetails\n\t\t}\n\t}\n\n\tif instanceConf.funcDetails.ProcessingGuarantees == pb.ProcessingGuarantees_EFFECTIVELY_ONCE {\n\t\tpanic(\"Go instance current not support EFFECTIVELY_ONCE processing guarantees.\")\n\t}\n\n\tif !instanceConf.funcDetails.AutoAck && //nolint:staticcheck\n\t\t(instanceConf.funcDetails.ProcessingGuarantees == pb.ProcessingGuarantees_ATMOST_ONCE ||\n\t\t\tinstanceConf.funcDetails.ProcessingGuarantees == pb.ProcessingGuarantees_ATLEAST_ONCE) {\n\t\tpanic(\"When Guarantees == \" + instanceConf.funcDetails.ProcessingGuarantees.String() +\n\t\t\t\", autoAck must be equal to true. If you want not to automatically ack, \" +\n\t\t\t\"please configure the processing guarantees as MANUAL.\" +\n\t\t\t\" This is a contradictory configuration, autoAck will be removed later.\" +\n\t\t\t\" Please refer to PIP: https://github.com/apache/pulsar/issues/15560\")\n\t}\n\n\treturn instanceConf\n}\n\nfunc newInstanceConf() *instanceConf {\n\tconfig := &conf.Conf{}\n\tcfg := config.GetConf()","sourceCodeStart":120,"sourceCodeEnd":156,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-function-go/pf/instanceConf.go#L120-L156","documentation":"The Go function runtime does not implement EFFECTIVELY_ONCE processing guarantees. newInstanceConfWithConf proactively panics at config load when the function details request it, so the operator knows immediately that the requested guarantees are unsupported rather than silently weakening delivery semantics.","triggerScenarios":"Deploying a Go function (or a Go instance started via pf) whose FunctionDetails set ProcessingGuarantees to EFFECTIVELY_ONCE.","commonSituations":"Function config copied from a Java function using effectively-once with transactions; tooling defaults changed; user assuming feature parity across runtimes.","solutions":["Switch ProcessingGuarantees to ATLEAST_ONCE (or ATMOST_ONCE) in the function config.","Use a Java/Python function if EFFECTIVELY_ONCE is mandatory.","Keep Go runtime updated and check whether newer versions add support before retrying."],"exampleFix":"// before\nprocessingGuarantees: EFFECTIVELY_ONCE // unsupported in Go\n// after\nprocessingGuarantees: ATLEAST_ONCE","handlingStrategy":"validation","validationCode":"if details.ProcessingGuarantees == pb.ProcessingGuarantees_EFFECTIVELY_ONCE {\n    return fmt.Errorf(\"Go functions do not support EFFECTIVELY_ONCE; use ATLEAST_ONCE\")\n}","typeGuard":null,"tryCatchPattern":"defer func() {\n    if r := recover(); r != nil {\n        if s, ok := r.(string); ok && strings.Contains(s, \"EFFECTIVELY_ONCE\") {\n            log.Fatalf(\"unsupported guarantees for Go runtime: %s\", s)\n        }\n        panic(r)\n    }\n}()","preventionTips":["Set ATLEAST_ONCE in function configs targeting the Go runtime.","Reject EFFECTIVELY_ONCE in CI checks on function manifests.","Choose the Java runtime when effectively-once semantics are required."],"tags":["go","processing-guarantees","unsupported-feature","configuration"],"backgroundTag":"unsupported-processing-guarantee","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"}