Open jsquire opened 7 months ago
@EldertGrootenboer: Based on the discussion, here and Stack Overflow, it appears that the client is renewing the lock correctly, but the service is rejecting the settlement if renewal is performed for more than 17 minutes. This can also be reproduced when using the receiver and manually calling to renew the lock.
I believe this requires service investigation, as it does not appear to be under the control of the client.
From @SeanFeldman on the original issue:
I've tried to reproduce this and can confirm that the message lock is renewed for over 20 minutes (I tried with 25), but when the message settlement is attempted to complete the message using
ProcessMessageEventArgs
, the operation fails.
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.
We are facing similar issue, but only when the MessageHandler causes a heavy CPU load. In this case the message lock is not being renewed and attempt to call CompleteMessageAsync after the message processing is done results in the "The lock supplied is invalid" exception. Hope it can help with the investigation.
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.
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #40339.
Please be aware that @ygavrishov is the author of the original issue and include them for any questions or replies.
Details
Description
Somehow
ServiceBusProcessor
cannot complete messages if processing lasts longer than 20 minutes. The same result is received withServiceBusReceiver
and regular renewal (every 4 minutes). Here is the code:Actual Behavior
Logs:
Expected Behavior
Message should be completed successfully.