For Scenario 1
Once you have observed that your client application stops pulling the message from Queue then how did the issue got mitigated? Have you restarted the application? Did you observe any exception/error when your client application stops consuming the messages? I am assuming that the sender application was still sending the messages during that time and you can see the active messages were increased for that queue.
There could be multiple reasons that the client was not able to pull the messages from the queue
• There might be some issues at the client end that would cause this behavior such as updates, high utilization, etc. Where is the client application hosted and have you looked into the client if there was an issue.
• There can be server busy/internal error at the service bus end and your client has retried multiple times (assuming you have implemented the retry logic in your code) and if the retries get exhausted then the exception would be thrown at the client end and your application stops.
For Scenario 2:
Lock lost exception generally is a client-side error, there are two possible causes, either there was some issue at the service bus end (high utilization, noisy neighbor, etc. ) or the client is too busy that it was unable to complete the request in a timely manner or some very slow network.
If you are observing lock lost more frequent and as you have mentioned that your business logic takes 1 or 2 sec then I suggest you to add logging in your application code to confirm the same. You can add a timer to your business logic that you are executing when you have acquired the lock and called the complete on that message. The log should give you the details what was the messageID that your application is consuming, timeframe in UTC, lock token that is acquired on that message along with the execution time for each and every statement (business logic)
You can also add a timer before and after CompleteAsync call to check how much time it is taking for the message to be marked as completed. I will also suggest you to to remove the prefetch when you are performing this test.
This needs in-depth troubleshooting from both client and service bus end. Once you have the above information and added more logging in your application please send an email with the subject line “Attn:Mayank” to AzCommunity[at]Microsoft[dot]com referencing this thread along with your Azure subscription ID, service bus name, queue name, receiver application details along with the exception message, message ID, lock token, timeframe for individual messages for which you have observed the issue.