Azure / Azure/azure-functions-host
[FEATURE REQ] Azure WebJobs Listeners extension point
- Dominant language
- C#
- Stars
- 2k
- Forks
- 482
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 36
Description
# Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, [#48339](https://github.com/Azure/azure-sdk-for-net/issues/48339).
### Please be aware that @nrjohnstone is the author of the original issue and include them for any questions or replies.
## Details
The WebJobs SDK is a great way to handle processing of messages from Storage Queues but it lacks some extension points / seams around determining which triggers get listeners created on startup.
Currently reflection is uses and everything with a trigger attribute gets a listener created for it UNLESS explicitly disabled through the various means.
If you have a single webjobs instance that has multiple queue triggers, and now you would like to deploy them as a container using container apps WITH scaling based on a specific queue, things now start to get difficult because the single image will attach to all queues.
What would be handy would be some configuration that allows either
1. All triggers to be DISABLED by default unless explicitly added in configuration using the existing mechanism AzureWebJobs__Disable
2. Customizing the logic around listener creation that allows extra code to be run to decide if the listener should be created or not (eg check customized configuratio values etc...)
Providing this mechansim means you can build a single webjobs container, but deploy it multiple times with different configurations and keda scalers and be safe knowing that that deployment will ONLY process the single queue it is configured for.
Currently I have a work around that is quite horrible, it involves using reflection to find all of the Timer, Queue etc.. trigger attributes, then checking if an explicit configuration exists for that function name, and if not THEN it forces a configuration value with Disabled = true.
Would be nice to have this functionality built in, as I think with the different deployment methods, having ALL triggers enabled by default when the process starts is not that helpful anymore.
Contributor guide
Research direction
Start by tracing the WebJobs SDK's reflection-based trigger listener creation and the existing AzureWebJobs__Disable configuration mechanism. Determine which extension-point or default-disable behavior best supports selective queue processing in separate deployments. Done means deployments can reliably create listeners only for the configured triggers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, csharp
- Domain
- backend, cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100