Hi,
I've been using the Microsoft.Azure.WebJobs.Extensions.ServiceBus-package to setup methods that act as triggers for ServiceBus subscriptions and it works great. However, the current setup only seem to allow for defining your triggers using the ServiceBusTrigger-attribute where queue/topic name are defined using compile time constants. I saw that you can also implement your own name resolver to get some more flexibility. But I wonder, is it possible to also register triggers through the DI somehow to avoid befing forced to use the attribute?
For example, it would be nice if I could do something like this (assuming that ITrigger is an interface from the package)
Hi, I've been using the
Microsoft.Azure.WebJobs.Extensions.ServiceBus
-package to setup methods that act as triggers for ServiceBus subscriptions and it works great. However, the current setup only seem to allow for defining your triggers using theServiceBusTrigger
-attribute where queue/topic name are defined using compile time constants. I saw that you can also implement your own name resolver to get some more flexibility. But I wonder, is it possible to also register triggers through the DI somehow to avoid befing forced to use the attribute?For example, it would be nice if I could do something like this (assuming that
ITrigger
is an interface from the package)