Reputation: 1979
I have an an Azure Function which I want to fail and sent to the poison queue if it errors once or twice. I've set the maxDequeueCount property in my host.json file to 1, but it still retries 5 times. Based on all the doco I've read this seems to be correct. Does anyone have any suggestions? Below is a sample of my hosts.json.
{
"version": "2.0",
"logging": {
"fileLoggingMode": "debugOnly",
"logLevel": {
// For all functions
"Function": "Trace",
// Default settings, e.g. for host
"default": "Trace"
},
"extensions": {
"queues": {
"visibilityTimeout": "00:01:00",
"maxDequeueCount": 1
}
}
}
}
Upvotes: 2
Views: 4199
Reputation: 31
Old question, but your problem was that your "extensions" property was inside your "logging" object rather than at the top level.
Upvotes: 3
Reputation: 15609
For storage queue trigger, to change frequency of the retry, we just need to change the value of maxDequeueCount
. Please go to azure portal to check the host.json
file.
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[1.*, 2.0.0)"
},
"extensions": {
"queues": {
"maxDequeueCount": 1
}
}
}
If the feature still doesn't work after restarting the function, I afraid that you need to raise a support ticket on azure portal, they will check the backend logs for you.
Upvotes: 1