pulsar icon indicating copy to clipboard operation
pulsar copied to clipboard

[improve][pip] PIP-372: Allow consumers to terminally NACK a message, bypassing retries and routing directly to the DLQ

Open jcass8695 opened this issue 6 months ago • 8 comments

PIP: 372

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:

  1. NACK the message and retry it up to the configured max retries, when it would then land in the DLQ.
  2. ACK the message and explicity produce it to the DLQ.
  3. 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:

jcass8695 avatar Aug 07 '24 07:08 jcass8695