使用多个 Azure 队列触发单个 Azure 函数

Triggering single Azure Function using multiple Azure Queues

我想在多个 Azure 队列中添加消息时触发单个 Azure 函数。

另外,是否可以在某些条件下触发 Azure Functions?就像 Azure 队列消息有 type 属性 作为 TYPE_1 那么只有它应该触发函数。

提前致谢。

了解如何create a function that is triggered when messages are submitted to an Azure Storage queue.

本文介绍了如何使用 Azure Queue storage bindings in Azure Functions. Azure Functions supports trigger and output bindings for queues.

门户网站为此配置提供了 UI,但您可以通过函数的“集成”选项卡打开高级编辑器来直接编辑文件。

在 .NET 中,参数类型定义输入数据的数据类型。例如,使用字符串绑定到队列触发器的文本,使用字节数组读取为二进制文件,使用自定义类型反序列化为对象。

对于 JavaScript 等动态类型的语言,使用 function.json 文件中的数据类型 属性。例如,要以二进制格式读取 HTTP 请求的内容,请将 dataType 设置为 binary:

JSON

Copy
{
    "dataType": "binary",
    "type": "httpTrigger",
    "name": "req",
    "direction": "in"
}

在本文中,您将了解有关 functions triggers and bindings.

的高级概念

如果您在这个问题上需要进一步的帮助,请告诉我。