Allow Azure Function triggers to be enabled/disabled at runtime
This feature would allow developers to decide when a triggered function (Service Bus, Event Grid, Storage queue, ...) should be disabled or re-enabled.
Consider the following scenario where you develop a function that's being trigged by new messages on a Service Bus Queue. Whenever your function gets triggered you call a downstream API. This downstream API could have throttling limits or might have issues. To get around this you think about implementing the Circuit Breaker pattern. Whenever the circuit opens, you would stop calling the downstream API.
Today the only way to stop processing messages it to completely stop the function app and this also requires a second function app or logic app to do this.
It would greatly simplify this implementation if there was a way for us developers to decide to stop the 'Listener' or when to start it again.
Good ask – we often here this too around having ‘circuit breaker’ as a better pattern all-up. Something we’ve considered and an appealing scenario, but nothing planned in the immediate future. Keep the votes coming.