Reputation: 429
I'm using Azure functions to deal with my service bus queue and I wanted to add a delay for when the item in the queue is processed again when it throws an exception and puts things back into the queue.
I added this piece of code to my host.json from the Microsoft Docs
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle",
"version": "[2.*, 3.0.0)"
},
"extensions": {
"serviceBus": {
"serviceBusOptions": {
"retryOptions": {
"mode": "fixed",
"tryTimeout": "00:00:10",
"delay": "00:00:30",
"maxDelay": "00:01:00",
"maxRetries": 4
},
"prefetchCount": 100,
"autoCompleteMessages": true,
"maxConcurrentCalls": 32,
"maxConcurrentSessions": 10,
"maxMessages": 2000,
"sessionIdleTimeout": "00:18:00",
"maxAutoLockRenewalDuration": "00:18:00"
}
}
}
}
However, my function is just ignoring these settings and not honoring the delay I set above.
Upvotes: 0
Views: 1667
Reputation: 21873
You maybe need this offical article.
host.json reference for Azure Functions 2.x and later
If you want to use retry Options
, you should use below sample code.
Not use Properties in RetryOptions Class
.
Upvotes: 1