I have an Azure Function project built on NET6. Function runtime version: 4.x, and this is my host.json
{
"version": "2.0",
"functions": [ "MyFunction" ],
"logging": {
"applicationInsights": {
"samplingSettings": {
"isEnabled": true
}
}
},
"extensions": {
"queues": {
"batchSize": 1,
"newBatchThreshold": 0,
"maxDequeueCount": 5,
"visibilityTimeout": "00:01:00"
}
}
}
But when I run in localhost for debugging, it looks like the host is not used at all:
- All the functions run instead of the one specified in the "functions" field in the host
- I force an exception in my queue trigger function but message get visible again after 10 minutes instead of 1 minute as specified in the extensions>queues>visibilityTimeout property
I checked in the bin folder (bin>Debug>net6.0) and I found the correct host.json.
I tried to create another project from scratch (same configuration) and I have the same problem. Specifying that I'm not running on an isolated worker model
I don't know if it may conflict, but I want to specify that I have configured dependency injection as well, in the Startup.cs class.
I tried to configure visibilityTimeout in my Startup class as well, but again, it hasn't worked.
I don't have any other idea
Startupclass code.