一个 Azure 函数的多个触发器
Multiple triggers for an Azure Function
我们有一个具有事件中心触发器的 Azure 函数。是否可以为同一个 Azure 函数在多个事件中心设置触发器?
不,目前不支持此方案。
From comments (Ling Toh Jan 18 '17 at 18:23):
There are no plans to support multiple triggers per Function. You will have to create a Function for each EventHub. If there is common code that may be shared between Functions, you may move them to a helper method that can be called from each Function.
来自Github: Any workarounds for adding multiple triggers? #1544
If you want to have your same function code run for blobs in either
account A or account B, the easiest thing to do this is to create
multiple function.json files for each function but have them share the
same code by pointing to the same script file. There's more info here.
我们有一个具有事件中心触发器的 Azure 函数。是否可以为同一个 Azure 函数在多个事件中心设置触发器?
不,目前不支持此方案。
From comments (Ling Toh Jan 18 '17 at 18:23): There are no plans to support multiple triggers per Function. You will have to create a Function for each EventHub. If there is common code that may be shared between Functions, you may move them to a helper method that can be called from each Function.
来自Github: Any workarounds for adding multiple triggers? #1544
If you want to have your same function code run for blobs in either account A or account B, the easiest thing to do this is to create multiple function.json files for each function but have them share the same code by pointing to the same script file. There's more info here.