Open kimberlyyong opened 4 months ago
Thank you for your feedback. We have opened an investigation task for this in our backlog, and will update this issue when we have more information.
This item in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this item.
Experiencing the same issue. Would like to use functionality if possible please.
Description
When message is not completed, the message not supposed to be processed until the Lock Duration expire. Message Lock Duration is set to 5 minutes
But non completed messages were retried every 10 seconds.
![image](https://github.com/Azure/azure-service-bus/assets/107013869/edac77e3-0cef-49a3-9db4-787d00ae7302)
Actual Behavior
Expected Behavior
Here is my code, this is to work around this issue https://github.com/Azure/azure-service-bus/issues/454#issuecomment-1932230429 var runResult = await ProcessEvent(retryAndExecutor, eventName, messageData, message.ApplicationProperties); if (runResult) { _logger.LogInformation($"Complete operation: {retryAndExecutor.Id} {args.Print()}"); await args.CompleteMessageAsync(message); } else { if (retryAndExecutor.HasChanged) { _logger.LogInformation($"Defer operation: {retryAndExecutor.Id} immediately, delivery count increased {args.Print()}"); await args.AbandonMessageAsync(message, retryAndExecutor.ApplicationProperties); } else { var timeInQueue = DateTimeOffset.UtcNow.Subtract(args.Message.EnqueuedTime).TotalMinutes; if (timeInQueue > _maxMinutesToProcess) { _logger.LogInformation($"DLQ operation: {retryAndExecutor.Id} timeInQueue {timeInQueue} exceeds {_maxMinutesToProcess} minutes. {args.Print()}"); await args.DeadLetterMessageAsync(message, $"TimeInQueue exceeds limit {_maxMinutesToProcess}"); } else { _logger.LogInformation($"Defer operation: {retryAndExecutor.Id} with message lock duration delay, delivery count stays the same {args.Print()}"); } } }