Say you have a host.json file like this:
{
"version": "2.0",
"extensions": {
"serviceBus": {
"messageHandlerOptions": {
"maxConcurrentCalls": 16,
"maxAutoRenewDuration": "00:05:00"
}
}
}
}
But you wish to override the setting locally in local.settings.json
or in the settings for a given environment on Azure. Is it possible, and how do you do it?
To find the application settings, see Get started in the Azure portal. The Application settings tab maintains settings that are used by your function app. You must select Show values to see the values in the portal. To add a setting in the portal, select New application setting and add the new key-value pair.
Your local functions can connect to live Azure services, and you can debug them on your local computer using the full Functions runtime.
Input Ctrl+C and Y to terminate functions.
It is possible, but poorly documented. Fabio Cavalcante describes it in a comment here.
You simply have to prefix the setting with AzureFunctionsJobHost
in your local.settings.json
file (or on Azure) like this:
{
"IsEncrypted": false,
"Values": {
"AzureFunctionsJobHost:Extensions:ServiceBus:MessageHandlerOptions:MaxConcurrentCalls": 32,
"AzureFunctionsJobHost:Extensions:ServiceBus:MessageHandlerOptions:MaxAutoRenewDuration": "00:10:00"
}
}
You can also use double underscore (__
) instead of colon (:
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With