我正在尝试找到正确的位置来为我的队列触发器设置批处理大小。基本上所有这些属性.."batchSize":1,"maxDequeueCount":2,"maxPollingInterval":5000,
当我查看这篇文章时,https://docs.microsoft.com/en-us/azure/azure-functions/functions-host-json
我有下面的触发器,我只需要一次发射一个,所以批量大小为1。
队列的名称保存在名为"DispatchQueueName“的local.settings.json变量中。
public static void OnFieldDevicePollingRequest_Run([QueueTrigger("%DispatchQueueName%", Connection = "AVStorageAccessKey")]string myQueueItem, ILogger log)
{
log.LogInformation($"Start Queue trigger function processed: {myQueueItem}");
log.LogInformation($"C# Queue trigger function processed: {myQueueItem}");
}
发布于 2019-06-13 10:37:12
您可以在host.json中设置以下配置。
{
"version": "2.0",
"extensions": {
"queues": {
"maxPollingInterval": "00:00:02",
"batchSize": 1,
"maxDequeueCount": 2
}
}
}
输出如下:
https://stackoverflow.com/questions/56569384
复制相似问题