Description
Query/Question
When enabling sessions on Azure Service Bus, the delivery count of a message does not increment automatically if an exception occurs during message processing. However, if the message is explicitly abandoned, it gets redelivered with an incremented delivery count but without any delay.
Previously, when using Service Bus without sessions, we didn’t explicitly abandon messages.
Instead, the messages were redelivered with an incremented delivery count after the message lock expired. However, after enabling sessions, this behavior changed, and the issue described began to occur.
Is there a way to introduce a delay before redelivering the message after it has been abandoned for the session based service bus?
For Setup
Enable the session on the service bus with peek lock mode and then try to raise an exception while processing the message and don't explicitly abandon the message then you can observe that the delivery count of the message won't increment on redelivery.
Why is this not a Bug or a feature Request?
As mentioned in the second point the delivery count won't increment if the message is not completed even if the message is locked.
Setup (please complete the following information if applicable):
- OS: macOS
- IDE: IntelliJ
- Library/Libraries: azure-messaging-servicebus - 7.13.2
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
- Query Added
- Setup information Added