Azure功能-事件中心未触发功能 [英] Azure Functions - Event Hub not triggering Functions

查看:104
本文介绍了Azure功能-事件中心未触发功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Azure基础结构:

I have an Azure infrastructure:

2个HTTP函数->事件中心-> 2个函数->表存储

2 HTTP Functions -> Event Hub -> 2 Functions -> Table Storage

(所以有两个将消息发送到事件中心的http函数,以及两个由事件中心的消息触发的函数,其中一个将消息存储在表存储中)

(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)

Azure ARM模板每天使用Azure CLI自动创建基础结构。最近两个月我没有改变逻辑,但是自4月初以来,我注意到了新的怪异行为。

The infrastructure is daily automatically created by Azure ARM templates, with the use of Azure CLI. I haven't changed the logic in recent two months but since beginning of April I have noticed the new, weird behaviour.

设置结束后,将自动执行E2E测试。他们正在发送一些消息,经过一段时间后,他们检查消息是否在表存储中。

At the end of setting up, E2E tests are executed automatically. They are sending some message and after some time they check, if message are in table storage.

这就是问题所在:自4月初以来,这些测试几乎总是失败!而且我没有更改基础架构的功能逻辑或template.json的逻辑。

And here is the problem: since beginning of April these tests almost always fail! And I did not change anything in logic of function or template.json's for infrastructure.

看来应该由Event Hub触发的功能根本没有执行!我已经找到了解决方法-如果我转到Azure门户并手动运行这些功能(代码编辑器上方的运行按钮),则这些功能终于开始起作用!

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!

还有其他人遇到这个问题吗?
是否可以通过某种方式自动,直接运行非HTTP触发的功能Azure CLI还是REST接口?

Does anybody else encounter this problem? Is there some way to automatically, directly run non-HTTP triggered function by e.g. Azure CLI or REST interface?

推荐答案

问题似乎已经众所周知:
https://github.com/Azure/Azure-Functions/issues/210

It seems that problem is already quite well known: https://github.com/Azure/Azure-Functions/issues/210

我正在使用此问题的当前解决方法,即在创建基础结构和压缩功能后调用Azure CLI的方法来同步功能触发器:

I'm using currently workaround from this issue, i.e. calling Azure CLI's method to synchronize function triggers after creating infrastructure and zip pushing of functions:

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

这篇关于Azure功能-事件中心未触发功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆