apache / apache/pulsar

[Bug] unable to achieve MANUAL semantics on pulsar-function-go SDK

Open
#23,834 0 comments 0 reactions 0 assignees View on GitHub
type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Search before asking

- [X] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.

### Read release policy

- [X] I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.

### Version

pulsar: v4.0.0

### Minimal reproduce step

1. use pulsar-function-go SDK to create a sample function using go runtime.
2. try to use MANUAL delivery method, where user has to handle the Ack() and Nack() of each message.
3. inside the created sample function, get FunctionContexted from the context object.
4. use the FunctionContext to Ack() or Nack() the current record/message manually

### What did you expect to see?

according to documentation: "A function to acknowledge the message being processed (if auto-ack is disabled)"
it is expected from SDK, to provide an API/method through FunctionContext, that has consumer information, so that Ack() & Nack() is possible

### What did you see instead?

fctx.GetCurrentRecord() returns a pulsar.Message instead of pulsar.ConsumerMessage, and not other way to access the consumer to Ack() / Nack() the records

### Anything else?

_No response_

### Are you willing to submit a PR?

- [ ] I'm willing to submit a PR!

Contributor guide

Open the contributing guide

Research direction

Start with the pulsar-function-go SDK's FunctionContext, GetCurrentRecord, and MANUAL delivery handling, then reproduce the behavior using the sample function described in the issue. Trace how the current record is exposed and where acknowledgement is expected to occur. Done means the documented manual Ack() and Nack() workflow is available through the SDK, with coverage for the reproduced case.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.