我正在尝试在发布 Web PubSub 消息时触发 Azure 函数。
根据本文中的示例,当新消息发送到特定集线器时,我应该能够使用以下功能触发功能......
{
"disabled": false,
"bindings": [
{
"type": "webPubSubTrigger",
"direction": "in",
"name": "data",
"hub": "ABC",
"eventName": "message",
"eventType": "user"
}
],
"scriptFile": "../dist/WebPubSubTrigger/index.js"
}
但是,每当我初始化函数应用程序时,我都会收到此错误...
The 'WebPubSubTrigger' function is in error: The binding type(s) 'webPubSubTrigger' were not found in the configured extension bundle. Please ensure the type is correct and the correct version of extension bundle is configured.
这是我在 host.json 中的 extensionBundle 配置...
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[3.3.0, 4.0.0)"
}
但是 这篇文章没有将它列为支持的绑定类型,所以至少可以说我有点困惑!
谁能指出我正确的方向?
我在 NodeJS 环境中运行我的函数,但我认为这不应该有所作为。
我也已经尝试过手动安装,如下所示,但告诉我它已经安装了♂️</p>
Me | Tue 28 @ 15:49 ~/Development $ func extensions install --package Microsoft.Azure.WebJobs.Extensions.WebPubSub --version 1.0.0
No action performed. Extension bundle is configured in /Users/me/Development/host.json`