Feature: Add ability to nack messages manually #1262
Labels
💟 Community involvement
A feature that the community is invloved with
epic: Broker
epic: DLS
Feature Request
New feature or request
Current behavior
Currently, there is no way to manually nack a message. Messages need to reach the
maxMsgDeliveries
count before it is moved to the DQL. There are situations where being able to manually nack a message to send it to the DLQ could be beneficial for example when you need to process messages in order and the head message can not be processed for whatever reason and you need to send all messages that share that key to the DLQ by storing the key in a datastore and nacking them until the issue is resolved and all messages that share the key can be resubmitted for consumption from the DLQ when the issue is fixed.Suggested solution
Add a nack method to be able to send a message directly to the DQL during consumer processing.
Example:
It could be interesting if Memphis allowed devs to blacklist message(s) that have a specific message id or key by exposing another method or an options object in the nack function Eg.
message.nack({ blacklistMessageKey: true })
forcing consumers to nack specific message(s) sending them to the DQL automatically until the key or id is removed from the blacklist via the SDK or GUI. This would prevent devs from having to introduce a secondary data store to build this behavior.Additional context
No response
Code of Conduct
Contributing Docs
The text was updated successfully, but these errors were encountered: