@Deepankar Malik Thanks for reaching out.
When you create a singleton object of the Service Bus sender in your .NET 6 startup.cs class and inject it into your class to send multiple messages, it creates one single connection to the Service Bus namespace. This is because the Service Bus SDK manages connections efficiently under the hood, and reuses connections where possible.
QuotaExceededException
occurs when the Service Bus namespace has reached its maximum capacity for the number of messages or connections.
For all the Quota related info please refer: https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas#messaging-quotas
Regarding the metrics "Connections Opened" and "Connections Closed" IN Application insights refers the total number of connections that were opened and closed respectively during the selected time range. It does not necessarily mean that the difference between these two values represents the number of open connections at a specific instance of time. The number of open connections at any given time would be the number of connections that have been opened but not yet closed. However, without additional information, it's not possible to determine the exact number of open connections at a specific instance of time based on these two metrics alone.
If you need to identify the exact cause, we might have to look at your resource specifically to troubleshoot this specific issue and our support team has great tools to investigate further. Do you have Support Plan? If so, I would recommend creating one. Otherwise let me know, I can create one time request for you.
let me know incase of further issues, I would be happy to assist you.
Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.