Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure an Azure Function triggered by Service Bus with a custom INameResolver?

I want to be able to control the name of the Service Bus Queue or Subscription that my Azure Function reads from at run-time.

With WebJobs (which Azure Functions are based on) you could do this by implementing and configuring a custom INameResolver, see: How to have a configuration based queue name for web job processing?

However, with Azure functions I have no access to JobHostConfiguration to wire up this custom resolver.

Can I still use an INameResolver, and if so how?

like image 315
Tom Robinson Avatar asked Jun 19 '17 08:06

Tom Robinson


1 Answers

Right now you cannot use a custom INameResolver as there is no mechanism for injecting your own services like this into the host. It's being tracked here: https://github.com/Azure/azure-webjobs-sdk-script/issues/1579

like image 198
brettsam Avatar answered Sep 28 '22 01:09

brettsam