Different connection string for output or trigger

后端 未结 1 1260
长情又很酷
长情又很酷 2021-01-22 16:48

Here i have a webjob function using servicebus triggers and outputs. I\'d like to set a different configuration for output and input.

public static void OnPush(
         


        
相关标签:
1条回答
  • 2021-01-22 17:04

    Yes, also in the latest beta1 release you'll see that there is now a ServiceBusAccountAttribute that you can apply along with the ServiceBusTrigger/ServiceBus attributes. For example:

        public static void Test(
            [ServiceBusTriggerAttribute("test"),
             ServiceBusAccount("testaccount")] BrokeredMessage message)
        {
            . . .
        }
    

    We've done the same for all the other attribute types (Queue/Blob/Table) via StorageAccountAttribute. These account attributes can be applied at the class/method/parameter level. Please give this new feature a try and let us know how it works for you. Also, see the release notes for more details.

    0 讨论(0)
提交回复
热议问题