Azure功能Blobtrigger试图执行5次
有一个斑点触发的功能。当触发时,由于代码中的错误而失败。之后,它触发了4次。
最后,该消息已记录消息已达到5的MaxDequeUecount
。在host.json中,我设置了maxDequeueCount = 1
。我假设这也适用于斑点,情况并非如此。
在主机的斑点部分中。JSONi只能配置 maxdegreeofparallelism 。
如何将Blob-Triggerd函数配置为每个Blob-trigger一次仅执行一次?
There is a blob-triggered function. When triggered it fails due to an error in the code. Afterwards it triggers 4 additional times.
At the end this message is logged Message has reached MaxDequeueCount of 5. Moving message to queue 'webjobs-blobtrigger-poison'.
I do understand that blob triggers internally work with queues. In the host.json I have set maxDequeueCount=1
. I was assuming this would also hold for the blobs, which is not the case.
In the blob section of the host.json I can only configure maxDegreeOfParallelism.
How can I configure blob-triggerd function to only execute once per blob-trigger?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
现在,仅通过
[fixedDelayReTry(5,“ 00:00:10”)]
属性,仅用于运行过程中,仅对事件中心触发器和计时器触发器支持每个功能的重试计数。Blob触发器应绑定到主机中的队列设置。JSON每个文档,也许这是他们github页面的问题!?
Retry count per function right now is only supported for Event Hub triggers and Timer triggers via
[FixedDelayRetry(5, "00:00:10")]
attribute and only for running in-process.Blob triggers should be bind to queue settings in host.json per docs , maybe this is a issue for they Github page!?
从您的答案来看,尚不清楚主机的哪个部分。
即使将其链接到Blob触发器,但必须在 queues 部分中添加此设置,如下所示。这应该适用于扩展版本2.x及更高版本。
{
“版本”:“ 2.0”,
“扩展”:{
“队列”:{
“ maxpollinginterval”:“ 00:00:02”,
“ visibility time”:“ 00:00:30”,
“批处理”:16,
“ maxdequeuecount”:1,
“ newbatchthreshold”:8,
“ messageEncoding”:“ base64”
}
}
}
From your answer it is not clear in which section of the host.json you have added maxDequeueCount=1.
Even though it is linked to the blob trigger, this setting has to be added in the queues section as shown below. This should work for the extension versions 2.x and higher.
{
"version": "2.0",
"extensions": {
"queues": {
"maxPollingInterval": "00:00:02",
"visibilityTimeout" : "00:00:30",
"batchSize": 16,
"maxDequeueCount": 1,
"newBatchThreshold": 8,
"messageEncoding": "base64"
}
}
}