Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Add ability to nack messages manually #1262

Open
1 of 2 tasks
itajenglish opened this issue Aug 19, 2023 · 1 comment
Open
1 of 2 tasks

Feature: Add ability to nack messages manually #1262

itajenglish opened this issue Aug 19, 2023 · 1 comment
Assignees
Labels
💟 Community involvement A feature that the community is invloved with epic: Broker epic: DLS Feature Request New feature or request

Comments

@itajenglish
Copy link

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:

consumer.on('message', (message, context) => {
    message.nack();
});

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

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@itajenglish itajenglish added Feature Request New feature or request 💟 Community involvement A feature that the community is invloved with labels Aug 19, 2023
@yanivbh1
Copy link
Contributor

Thank you, @itajenglish. Highly interesting!
NACK will be enabled soon, in regard to the "blacklist" suggestion, I can see the benefit. Would require a discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💟 Community involvement A feature that the community is invloved with epic: Broker epic: DLS Feature Request New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants