Expose a way to pass Name of Factory Client to Function Triggers #43650
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
needs-team-attention
This issue needs attention from Azure service team or SDK team
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Bus
Library name
Microsoft.Azure.Functions.Worker
Please describe the feature.
Feature Request:
Currently when using a ServiceBusTrigger you need to specify the Connection String - It would be nice if we could instead pass the name of a Factory Client and it would be able to proceed from there. This internally could rely on the IAzureClientFactory for DI.
This could also be extended to other clients that have connections like BlobTrigger/QueueTrigger
Problem being solved:
Able to use DI to setup the Connection AND options.
And in the future something like this could be registered and tied to a new Trigger [ServiceBusTrigger(ClientName = "ServiceBusSession1", IsSessionsEnabled = true)]
Currently options for servicebustrigger are only configurable in host.json, this would allow them to pull from here.
Edit:
It looks the the ServiceBusListener used by the current ServiceBusTrigger is using MessagingProvider as a factory, instead of registering them to the IAzureClientFactory<> and retrieving them from there. There is also a separate class ServiceBusClientFactory also using MessagingProvider. currently it is using a concurrent dictionary with a key generated by entityPath which is generated by the code based on inputs.
The text was updated successfully, but these errors were encountered: