About Azure Functions maxDequeueCount in host.json

Jona 455 Reputation points
2024-06-23T06:44:44.7533333+00:00

Hi,

I'm using Azure Functions (Python) and configuring to executed the function just once so that it terminates and send the message to poison queue.

I'm setting maxDequeueCount to one, but it won't work. This is my host.json file

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[4.*, 6.0.0)"
  },
  "extensions": {
    "eventHubs": {
        "maxEventBatchSize" : 500,
        "minEventBatchSize" : 200,
        "maxWaitTime" : "00:0:05",
        "clientRetryOptions":{
            "mode" : "exponential",
            "tryTimeout" : "00:01:00",
            "delay" : "00:00:00.80",
            "maximumDelay" : "00:01:00",
            "maximumRetries" : 1
        }
    },
    "queues": {
      "maxPollingInterval": "00:00:02",
      "visibilityTimeout" : "00:00:30",
      "batchSize": 16,
      "maxDequeueCount": 1,
      "newBatchThreshold": 8,
      "messageEncoding": "base64"
    }
  }
}

The message from the local console debugging is telling me that it tries 5 times before sending the message to poison queue.

queue

Regards

Jona

Azure Functions
Azure Functions
An Azure service that provides an event-driven serverless compute platform.
4,536 questions
Azure Queue Storage
Azure Queue Storage
An Azure service that provides messaging queues in the cloud.
99 questions
0 comments No comments
{count} votes