[Enhancement] Add support for negatively acknowledging messages in Python functions
- Dominant language
- Java
- Stars
- 15.3k
- Forks
- 3.8k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 160
Description
### Search before reporting
- [x] I searched in the [issues](https://github.com/apache/pulsar/issues) and found nothing similar.
### Motivation
Currently there's no way to explicly nack messages in Python functions.
Use case:
This would be useful in using a Python function as a dynamic router that forwards Pulsar messages to multiple other topics. In such a Pulsar function, it would be necessary to configure `autoAck` to `false` and handle acknowledgement only after the forwarded message has be successfully sent to the destination topic.
If this fails, the input message should be negatively acknowledged.
### Solution
Add negative acknowledgement support to Pulsar Functions Python library and implementation.
### Alternatives
_No response_
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Contributor guide
Research direction
Start by locating the Pulsar Functions Python library and its implementation, then inspect the existing acknowledgement APIs and the autoAck behavior described in the issue. Done means Python functions can explicitly negatively acknowledge an input message when forwarding fails while preserving acknowledgement after successful delivery.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100