将多个Azure EventHub触发器触发到Azure Function应用中的单个函数 [英] Multiple Azure EventHub trigger to single function in Azure Function app
问题描述
我想从两个不同的eventhub中执行相同的功能(基于消息数据的更改很少).
I want to do the same functionality (with few changes based on message data) from two different eventhubs.
是否可以将两个使用者组附加到一个功能上.
Is it possible to attach two consumer group to a single function.
即使将其添加到function.json,它也无法正常工作.
It did not work even though I add it to function.json.
推荐答案
简短的回答是否".您不能将多个输入触发器绑定到同一函数: https://github.com/Azure/azure-webjobs- sdk-script/wiki/function.json
The short answer is no. You cannot bind multiple input triggers to the same function: https://github.com/Azure/azure-webjobs-sdk-script/wiki/function.json
一个函数只能有一个触发器绑定,并且可以有多个输入/输出绑定.
A function can only have a single trigger binding, and can have multiple input/output bindings.
However, you can call the same "shared" code from multiple functions by either wrapping the shared code in a helper method, or using Precompiled Functions.
这篇关于将多个Azure EventHub触发器触发到Azure Function应用中的单个函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!