Azure / amqpnetlite

AMQP 1.0 .NET Library
Apache License 2.0
396 stars 141 forks source link

Help: Setting max threads #572

Closed Marvin-Brouwer closed 9 months ago

Marvin-Brouwer commented 10 months ago

Hi,

I tried using your library to interface with an Azure ServiceBus, because we needed a sync alternative to microsoft's SDK. However, the third party running our code is seeing a lot of threads. I can see there's some level of configuration that can be done using a ConnectionFactory, however that only has a CreateAsync method.

Is there a way to set these for the sync version?

AMQP =
{
    MaxLinksPerSession = 1,
    MaxSessionsPerConnection = 1
}

And would that perhaps even help?

Marvin-Brouwer commented 10 months ago

Hi,

I no longer necessarily need this functionality. I'll leave the issue open for the maintainers to either close or still answer.

xinchen10 commented 9 months ago

Without the call-stacks of the threads it is hard to tell which configuration would help. I guess the application is doing a lot of sync calls by waiting on the tasks. In that case the number of threads depend on how many concurrent calls made by the application, instead of how the connections are created.