hi Adam )) thanks for posting it here at Q&A.
yes, not disposing senders and receivers can totally mess things up. even if u inject servicebusclient as a singleton, those sender and receiver objects still hog resources. the docs say closing them kills the link to service bus, while disposing the client nukes the whole connection. so they're different levels of cleanup )
each sender/receiver creates its own link over the shared connection. too many links? boom, handle exhaustion. check if u're properly disposing them with 'using' blocks or manual dispose calls. this might help in other tools too where resource leaks creep in. as for the connection limits, service bus standard tier allows up to 5k concurrent connections per namespace. sounds like a lot, but with multiple apps sharing one namespace, it adds up fast. worth looking into splitting high traffic apps to separate namespaces if u're hitting limits. monitor 'active connections' metric in azure portal. if u see it climbing steadily, u've got leaks or just need more namespaces. its all in the docs here https://docs.microsoft.com/en-us/azure/service-bus-messaging/monitor-service-bus
tune maxconcurrentcalls and prefetchcount on receivers. lower values mean fewer handles in use at once. sometimes slower is actually more stable )))
service bus sdk automatically caches senders. so reusing the same sender instance is better than creating new ones constantly. less overhead, fewer handles. clever, right?
if u're still stuck, maybe peek at connectionstatistics in servicebusclient to see where those handles are going :))
hope this helps u
best regards,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer