memphis.js
memphis.js copied to clipboard
Reject message
Describe the bug It is not the bug per se..but there is currently no way to send the message explicitly to the DLQ. For any reason, consumers must be able to notify the broker that this message can not be processed, sending the message to DLQ. The application decides the message can never be processed (for example, the context subject has no permission to perform this operation), meaning retry will not work, even if you do that 1000 times.
To Reproduce
I can use message.ack to acknowledge the message that considers it to be executed.
Expected behavior Any event/queue consumer must be able to explicitly reject the message, letting the broker know that this message can not be processed and send it to DLQ. Currently, this can be achieved only based on schema - that is not the best practice.
Additional context Add any other context about the problem here.
Hi @andreieuganox, Your required behavior is called NACK, meaning "Do not acknowledge", and force the broker to flag this event/message as a dead-letter. @idanasulinmemphis, it would be great to add for the next release.
@yanivbh1 thank you for picking it...again) Seems we will have some tickets to go through with you, sorry for that upfront)
Exactly as you mentioned, NACK is one of the must have, IMHO.
Apart from that, it seems to be impossible to pick anything up from DLQ (I can be wrong here, need to read docs more)
@andreieuganox , in the coming release, consumption for DLQ would be enabled in the coming release. Two weeks from now. Till then, dead-letter messages can be transmitted via the GUI.