Skip to content

[BUG] DLQ reason and description not working in spring-cloud-azure-stream-binder-servicebus #41883

Open

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

  1. Create an appropriate setup using Azure ServiceBus
  2. Consume a message from a test topic
  3. Deliberately fail the consumption by throwing an exception during the processing
  4. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service Busazure-spring-servicebusSpring service bus related issues.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions