I have an Azure Function App that has ServiceBusTrigger
binding.
public static void Run([ServiceBusTrigger("my-queue")]string request, TraceWriter log)
I would like to debug it locally without having to connect to an Azure Service Bus; however, there's no ASB Emulator available (Using Azure Service Bus in local). Thus, my next effort is to switch to Storage Queue (as I am having Azure Storage Emulator running on my device) when debugging it locally only.
public static void Run([QueueTrigger("my-queue")]string request, TraceWriter log)
My question is: Do we have a way to define binding as such it will listen to Storage Queue on local environment, but will switch to Service Bus when deployed to production?
This sounds like XY problem, so if anyone has better idea to solve my X problem, I'm all ears.