Azure Service Bus and brokered connections with NServiceBus

I’m currently looking at pricing for using Azure Service Bus with NServiceBus. One thing I don’t quite understand is how many brokered connections (first 1000 are free) I can assume necessary. So my question is, how many brokered connections does an NServiceBus endpoint using ASB normally use? Does it create a connection at startup and just keep using this until shutdown, or is a new connection made every X seconds or minutes, or how does it work?

Hi

We are currently using the approach where each MessageReceiver and MessageSender has its own connection. At the time of writing this we have one MessageReceiver per message pump. A regular endpoint has normally one message pump except if you use satellites then there is an additional pump per satellite. Then we have a sender pool to increase the speed of sends.

For the sends it depends which transaction support you are using. If you are using SendsWithAtomicReceive then we have to manage at least one sender per destination and receiver combination (meaning those senders will share the connection of the receiver). For the other transaction modes we normally at least one sender per destination. Our performance tests have shown that under heavy load we have at most two senders per destination open.

So in short

SendsWithAtomicReceive:

1 connection per pump, the connection is shared with all the senders

ReceiveOnly | None

1 connection per pump, at most two connection per destination

Hope that helps

Regards
Daniel

Yes, thank you for the information.