[fix][fn] Fix Go function runtime to continue after user exceptions and add neg-ack tests - #25867
Merged
Merged
Conversation
…nd add neg-ack tests Signed-off-by: Dream95 <zhou_8621@163.com>
lhotari
reviewed
May 25, 2026
priyanshu-ctds
pushed a commit
to datastax/pulsar
that referenced
this pull request
Jun 9, 2026
…nd add neg-ack tests (apache#25867) Signed-off-by: Dream95 <zhou_8621@163.com> (cherry picked from commit a5c1029) (cherry picked from commit 6fb674d)
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
Aug 28, 2026
…nd add neg-ack tests (apache#25867) Signed-off-by: Dream95 <zhou_8621@163.com> (cherry picked from commit a5c1029)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Go function runtime currently exits the processing loop when user code returns an error, which causes behavior inconsistency with Java/Python runtimes and prevents expected retry/negative-ack flow in failure scenarios.
This PR aligns Go runtime behavior for user-function failures and adds integration coverage for Go neg-ack semantics.
This PR aligns Go runtime behavior for user-function failures and adds integration coverage for Go neg-ack semantics.
Modifications
pulsar-function-go/pf/instance.go:handleUserError,handlePublishError).shouldNackInputOnFailure()and enablednackforATLEAST_ONCEandMANUALon user-function failures.pulsar-function-go/pf/instance_test.go:tests/docker-images/latest-version-image/go-examples/exceptionFunc/exceptionFunc.go.testGoFunctionNegAckin Go integration test suite.Verifying this change
This change added tests and can be verified as follows:
(example:)
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Matching PR in forked repository
PR in forked repository: Dream95#10