【发布时间】:2020-06-24 21:05:44
【问题描述】:
我有一个 Azure 队列触发器应用。它尝试尽快处理消息,但是当我在队列中有 1000 条消息时,我想限制它每秒处理的队列消息数。有没有办法设置限制?
我的目标是减慢我的函数处理消息的速度。
{
"generatedBy": "Microsoft.NET.Sdk.Functions-1.0.24",
"configurationSource": "attributes",
"bindings": [
{
"type": "queueTrigger",
"queueName": "fred",
"connection": "",
"name": "myQueueItem"
}
],
"disabled": false,
"scriptFile": "../bin/run.dll",
"entryPoint": "Fred.Run"
}
【问题讨论】:
-
您可以使用事件中心和吞吐量单元来做到这一点。我认为没有办法使用队列触发器来做到这一点。
-
请参阅this answer 来回答一个非常相似的问题。
标签: azure azure-functions message-queue azure-queues queuetrigger