Description
Describe the bug
This is an addendum to this issue and the original description of the BUG still applies.
Issue #40951 was addressed in PR #41172 which has by now been merged and rolled out.
Unfortunately it looks like the PR is not fully solving the initial issue as the parametrized call to messageContext.deadLetter
was correctly added but the old non-parametrized call was not removed (see here)
As the first call to messageContext.deadLetter
is still the non-parametrized one, there is still no DLQ reason or description being transmitted - as by the time the parametrized one is called the message is settled and thus aside from an exception denoting this nothing else happens.
To Reproduce
- Create an appropriate setup using Azure ServiceBus
- Consume a message from a test topic
- Deliberately fail the consumption by throwing an exception during the processing
- Check the DLQ for the missing reason and description
Code Snippet
see here
if (messageContext != null) {
messageContext.deadLetter(); //This line would have to be removed
DeadLetterOptions options = new DeadLetterOptions();
options.setDeadLetterReason(deadLetterReason);
options.setDeadLetterErrorDescription(deadLetterErrorDescription);
messageContext.deadLetter(options);
}
Expected behavior
If a message consumption fails due to an exception I expect to see the DLQ reason and description as intended in the Azure Service Bus Topic DLQ
Setup (please complete the following information):
Setup-Agnostic issue.
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added