Reputation: 1303
I am trying to find the right place to set a batch size for my queue trigger. Basically all these properties.. "batchSize": 1, "maxDequeueCount": 2, "maxPollingInterval": 5000,
When I checked this article, https://learn.microsoft.com/en-us/azure/azure-functions/functions-host-json
It does not talk about setting up configurations for queue triggers in host.json.
I have the following trigger which I only need fired one at a time, so batch size 1.
The name of the queue is saved in my local.settings.json in variable called "DispatchQueueName"
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}");
}
I am using .net core and need help with this soon please.
Upvotes: 0
Views: 2980
Reputation: 20127
It does not talk about setting up configurations for queue triggers in host.json.
You could set below configuration in host.json.
{
"version": "2.0",
"extensions": {
"queues": {
"maxPollingInterval": "00:00:02",
"batchSize": 1,
"maxDequeueCount": 2
}
}
}
The output is as below:
For more details, you could refer to this article.
Upvotes: 3