I'm implementing an AzureBusServiceClient and i'm asking if with this configuration below :
And an example of injection:
If i have 3 processors who does "var client = serviceBusClientFactory.CreateClient("Name1");", will i have a new instance each time? Or only one instance is created and retrieved for other calls?
Thank you and sorry for my english :)
Ihave tried for now the singleton approach but i prefer this approach with the factory to handle multiple serviceClientBus.
Any registration that uses the builder from AddAzureClients
is a singleton, Service Bus included.
For those that are curious about the details, the AddServicebusClient call invokes AzureClientFactoryBuilder.RegisterClientFactory, which manipulates the service collection.