{"record":{"id":"372d9fad794b5667","repo":"apache/pulsar","slug":"when-guarantees-s-autoack-must-be-equal-to-tr","errorCode":null,"errorMessage":"When Guarantees == %s, autoAck must be equal to true. If you want not to automatically ack, please configure the processing guarantees as MANUAL. This is a contradictory configuration, autoAck will be removed later. Please refer to PIP: https://github.com/apache/pulsar/issues/15560","messagePattern":"When Guarantees == (.+?), autoAck must be equal to true\\. If you want not to automatically ack, please configure the processing guarantees as MANUAL\\. This is a contradictory configuration, autoAck will be removed later\\. Please refer to PIP: https://github\\.com/apache/pulsar/issues/15560","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"pulsar-function-go/pf/instanceConf.go","lineNumber":144,"sourceCode":"\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()\n\tif cfg == nil {\n\t\tpanic(\"config file is nil.\")\n\t}\n\treturn newInstanceConfWithConf(cfg)\n}\n","sourceCodeStart":126,"sourceCodeEnd":162,"githubUrl":"https://github.com/apache/pulsar/blob/820761864ed8e2a7d2e52dd9763ad2ae117c1395/pulsar-function-go/pf/instanceConf.go#L126-L162","documentation":"For ATLEAST_ONCE/ATMOST_ONCE guarantees the runtime relies on automatic acknowledgement; a config that disables AutoAck while requesting these guarantees is contradictory. newInstanceConfWithConf panics with this explanatory message pointing to PIP 15560 (autoAck deprecation), telling the user to use MANUAL instead.","triggerScenarios":"FunctionDetails with AutoAck=false and ProcessingGuarantees = ATMOST_ONCE or ATLEAST_ONCE.","commonSituations":"Users trying to manually ack with the Go runtime while keeping at-least-once; configs migrated from deprecated autoAck toggling; confusion between autoAck and MANUAL guarantees after the PIP.","solutions":["Set AutoAck=true when using ATMOST_ONCE or ATLEAST_ONCE.","If manual acking is desired, set ProcessingGuarantees to MANUAL instead of disabling autoAck.","Update configs/templates to stop relying on autoAck=false (deprecated per PIP 15560)."],"exampleFix":"// before\nautoAck: false\nprocessingGuarantees: ATLEAST_ONCE // contradictory\n// after\nprocessingGuarantees: MANUAL // for manual acks\n// or\nautoAck: true\nprocessingGuarantees: ATLEAST_ONCE","handlingStrategy":"validation","validationCode":"if !details.AutoAck && (details.ProcessingGuarantees == pb.ProcessingGuarantees_ATMOST_ONCE ||\n    details.ProcessingGuarantees == pb.ProcessingGuarantees_ATLEAST_ONCE) {\n    return fmt.Errorf(\"contradictory config: set MANUAL for manual acks, or enable autoAck\")\n}","typeGuard":null,"tryCatchPattern":"defer func() {\n    if r := recover(); r != nil {\n        if s, ok := r.(string); ok && strings.Contains(s, \"autoAck must be equal to true\") {\n            log.Fatalf(\"fix guarantees/autoAck combination: %s\", s)\n        }\n        panic(r)\n    }\n}()","preventionTips":["Use MANUAL guarantees instead of autoAck=false for manual acknowledgement.","Remove autoAck toggles from templates per PIP 15560 (https://github.com/apache/pulsar/issues/15560).","Validate the guarantees/autoAck combination in deployment tooling before submit."],"tags":["go","processing-guarantees","autoack","configuration"],"backgroundTag":"contradictory-ack-configuration","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"}