[BUG] FluxAutoComplete and FluxAutoLockRenew logic end too early even before the downstream business logic begins. #23039
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
issue-addressed
Workflow: The Azure SDK team believes it to be addressed and ready to close.
Service Bus
Describe the bug
FluxAutoComplete and FluxAutoLockRenew logic end too early even before the downstream business logic begins.
Currently, our project need consume service bus messages batch by batch. But the processor client does not support a batch consumer (#23040) . So I turn to ServiceBusReceiverClient, there is a method that returns several messages one time. So I code like this:
but when i debug i find the FluxAutoComplete and FluxAutoLockRenew logic will be ended too early even before my logic begins, hence exception raised.
Exception or Stack Trace
....
Caused by: com.azure.core.amqp.exception.AmqpException: The lock supplied is invalid. Either the lock expired, or the message has already been removed from the queue.
....
To Reproduce
Steps to reproduce the behavior:
1 Create a service bus queue and set the Message lock duration to 10 seconds
2 Disable the autocomplete but keep the autolockrenew enabled in the client side
3 Use the code above to reproduce the behavior
Code Snippet
Add the code snippet that causes the issue.
Expected behavior
A clear and concise description of what you expected to happen.
After the logic consuming the batch of messages ends , the autocomplete and autolockrenew end according to the result of the logic.
Screenshots
If applicable, add screenshots to help explain your problem.
Setup (please complete the following information):
Additional context
Add any other context about the problem here.
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
The text was updated successfully, but these errors were encountered: