1
votes

I'm dealing with a high throughput application of EventHub. According to the documentation, in order to achieve very high throughput from a single sender, then multiple message factories with one EventHubClient object needs to be created.

Best Practices for performance improvements using Service Bus brokered messaging suggests Creating and reusing multiple factories for achieving performance improvements.

Is ServiceBus connection pooling available officially?

1

1 Answers

2
votes

The message is the same in both of those links. Clients created from the same MessagingFactory instance will use the same underlying AMQP socket connection. For low throughput sending from the same process, then reusing the MessagingFactory is perfectly fine and preferred because it will cause fewer connections on the server-side (and connections are a limited resource). In the doc "Best Practices for performance improvements using Service Bus brokered messaging" that you link to, if you notice further down in the doc it says:

  • Multiple factories: all clients (senders in addition to receivers) that are created by the same factory share one TCP connection. The maximum message throughput is limited by the number of operations that can go through this TCP connection. The throughput that can be obtained with a single factory varies greatly with TCP round-trip times and message size. To obtain higher throughput rates, you should use multiple messaging factories

Which is the same message from the Event Hub documentation that you link to.