Azure / azure-functions-nodejs-worker

The Node.js worker for the Azure Functions runtime - https://functions.azure.com
MIT License
107 stars 44 forks source link

Settings on serviceBus.clientRetryOptions is not upheld for serviceBusTopic triggers on the node worker #730

Closed JorgenSQ closed 8 months ago

JorgenSQ commented 10 months ago

Investigative information

Repro steps

  1. build basic version of serviceBusTopic template
  2. connect it two a queue
  3. Configure host.json with the following settings:
{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensions": {
    "serviceBus": {
        "clientRetryOptions":{
            "mode": "exponential",
            "tryTimeout": "00:05:00",
            "delay": "00:00:10.00",
            "maxDelay": "00:10:00",
            "maxRetries": 3
        }
      }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[4.0.0, 5.0.0)"
  }
}

Expected behavior

When configuring the retryOptions as above, you would expect the service bus client in the function to wait 10 seconds the first time it fails before retrying.

Actual behavior

It retries all times immediatly, violating both the "delay" and "maxRetries" setting (none of the settings work).

Known workarounds

Provide a description of any known workarounds.

None

Related information

None

ejizba commented 10 months ago

Hi @JorgenSQ Can you give more details on what you're trying to retry? For example I think those settings are somewhat limited in scope based on these docs:

The clientRetryOptions settings only apply to interactions with the Service Bus service. They don't affect retries of function executions.

microsoft-github-policy-service[bot] commented 9 months ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.