pulsar
pulsar copied to clipboard
[improve][pip] PIP-372: Allow consumers to terminally NACK a message, bypassing retries and routing directly to the DLQ
Motivation
If a consumer consumes a message and fails during the processing of that message in a terminal way, we as the client in certain scenarios may not want to retry that message later, we may want to send it directly to the DLQ. Currently, if the client wanted a persistent record of the message, they would have to do one of:
- NACK the message and retry it up to the configured max retries, when it would then land in the DLQ.
- ACK the message and explicity produce it to the DLQ.
- ACK the message and persist it in some other system, e.g. a database table, a log file.
I propose adding an interface that allows a consumer to terminally NACK a message, sending it directly to the DLQ instead of retrying.
Modifications
No modification yet.
Verifying this change
- [ ] Make sure that the change passes the CI checks.
This change is a trivial rework / code cleanup without any test coverage.
- Documentation only
Does this pull request potentially affect one of the following parts:
- [ ] Dependencies (add or upgrade a dependency)
- [ ] The public API
- [ ] The schema
- [ ] The default values of configurations
- [ ] The threading model
- [ ] The binary protocol
- [ ] The REST endpoints
- [ ] The admin CLI options
- [ ] The metrics
- [ ] Anything that affects deployment
Documentation
- [x]
doc
- [ ]
doc-required
- [ ]
doc-not-needed
- [ ]
doc-complete
Matching PR in forked repository
PR in forked repository: