2

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
      }
    }
  }
}
5
  • Are you debugging locally or Azure function is deployed? Commented May 12, 2020 at 5:33
  • Hi @PranavSingh my function is deployed to Azure Commented May 12, 2020 at 13:59
  • Were you using storage queue trigger or service bus queue trigger? Commented May 16, 2020 at 14:45
  • Hi @TonyJu it's a storage queue trigger Commented May 19, 2020 at 3:34
  • Hi @TonyJu would you have any ideas? Commented May 28, 2020 at 23:58

2 Answers 2

3

Old question, but your problem was that your "extensions" property was inside your "logging" object rather than at the top level.

Sign up to request clarification or add additional context in comments.

Comments

1

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.

1 Comment

For BlobTrigger you need to use this in host.json. "extensions": { "blobs": { "maxDegreeOfParallelism": 4, "poisonBlobThreshold": 1 } } learn.microsoft.com/en-us/azure/azure-functions/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.