Azure / Azure/azure-functions-host

Multiple environments for host.json

Open
#4,871 0 comments 1 reaction 0 assignees View on GitHub
enhancement
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### What problem would the feature you're requesting solve? Please describe.
When debugging a service bus triggered Azure Function locally I often have multiple messages handled simultaneously. This troubles the debugging process. As a result of that I fix it with a trick to handle only 1 service bus message at the time by adding the following to host.json
```json
{
"version": "2.0",
"extensions": {
"serviceBus": {
"messageHandlerOptions": {
"maxConcurrentCalls": 1
}
}
}
}
```

#### Describe the solution you'd like'
However, either I have to add the host.json file to the .gitignore file, which I don't like. Or I have to revert my changes every time I commit. I would be nice to have a solution just like with `appsettings.development.json`. In this way I never accidentally commit the `maxConcurrentCalls` setting and kill the performance 😂

Contributor guide

Open the contributing guide

Research direction

Start by reviewing how host.json is loaded and compare the requested behavior with appsettings.development.json. Done means developers can use environment-specific local host settings, such as maxConcurrentCalls, without changing or ignoring the committed host.json.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure
Domain
backend, cloud
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.