简体   繁体   English

Azure功能-事件中心未触发功能

[英]Azure Functions - Event Hub not triggering Functions

I have an Azure infrastructure: 我有一个Azure基础结构:

2 HTTP Functions -> Event Hub -> 2 Functions -> Table Storage 2个HTTP函数->事件中心-> 2个函数->表存储

(so two http functions sending messages to event hub, and two functions triggered by messages in Event Hub, one of them saving message in table storage) (因此,有两个将消息发送到事件中心的http函数,以及两个由事件中心中的消息触发的函数,其中一个将消息存储在表存储中)

The infrastructure is daily automatically created by Azure ARM templates, with the use of Azure CLI. 每天使用Azure CLI使用Azure ARM模板自动创建基础结构。 I haven't changed the logic in recent two months but since beginning of April I have noticed the new, weird behaviour. 最近两个月我没有改变逻辑,但是自4月初以来,我注意到了新的怪异行为。

At the end of setting up, E2E tests are executed automatically. 设置结束时,将自动执行E2E测试。 They are sending some message and after some time they check, if message are in table storage. 他们正在发送一些消息,经过一段时间后,他们检查消息是否在表存储中。

And here is the problem: since beginning of April these tests almost always fail! 这就是问题所在:自4月初以来,这些测试几乎总是失败! And I did not change anything in logic of function or template.json's for infrastructure. 而且我没有更改基础架构的功能逻辑或template.json的逻辑。

It looks that Functions that should be triggered by Event Hub are not executed at all! 看来应该由事件中心触发的功能根本没有执行! I have already found a workaround for it - if I go to Azure portal and run these functions manually ("Run" button above code editor), then the functions finally starts to work! 我已经找到了解决方法-如果我转到Azure门户并手动运行这些功能(代码编辑器上方的“运行”按钮),则这些功能最终将开始工作!

Does anybody else encounter this problem? 有人遇到这个问题吗? Is there some way to automatically, directly run non-HTTP triggered function by eg Azure CLI or REST interface? 是否有某种方法可以通过Azure CLI或REST接口自动,直接运行非HTTP触发的功能?

It seems that problem is already quite well known: https://github.com/Azure/Azure-Functions/issues/210 看来问题已经众所周知: https//github.com/Azure/Azure-Functions/issues/210

I'm using currently workaround from this issue, ie calling Azure CLI's method to synchronize function triggers after creating infrastructure and zip pushing of functions: 我正在使用此问题的当前解决方法,即在创建基础结构和压缩函数后调用Azure CLI的方法来同步函数触发器:

az resource invoke-action --resource-group <resourceGrouName> --action syncfunctiontriggers --name <functionAppName> --resource-type Microsoft.Web/sites

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM