Skip to content

[QUESTION] How to configure @ServiceBusListener ServiceBusReceiveMode among Spring Message #38739

Open
@kensinzl

Description

@kensinzl

Query/Question

  • I am using Spring Message @ServiceBusListener to receive the Azure Service Bus Queue message.
  • I refer to this official page
    https://learn.microsoft.com/en-us/azure/developer/java/spring-framework/using-service-bus-in-spring-applications
  • I know the difference between PEEK_LOCK and RECEIVE_AND_DELETE of the ServiceBusReceiveMode, but
    1. I did not find any attribute of @ServiceBusListener to configure the above receive mode?
    2. Meanwhile, even I have tried to configure spring.cloud.azure.servicebus.consumer.receive-mode=RECEIVE_AND_DELETE or spring.cloud.azure.servicebus.processor.receive-mode=RECEIVE_AND_DELETE at the application.properties file, the result seems still PEEK_LOCK, that means the message does not be deleted upon receiving

my question is how to configure the ServiceBusReceiveMode for the Java springboot if you use the annotation, eg: @ServiceBusListener

Setup (please complete the following information if applicable):

  • Java Spring Boot
        <dependency>
            <groupId>com.azure.spring</groupId>
            <artifactId>spring-messaging-azure-servicebus</artifactId>
            <version>5.9.1</version>
        </dependency>
### Tasks

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.Service Busazure-springAll azure-spring related issuesazure-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

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions