I have an Azure Function using an input binding on a servicebus and an output binding on a servicebus.
SB_Input --> AzureFunction --> SB_Output
[FunctionName("MyFunction")]
[return: ServiceBus("%OutputTopic%", Connection = "OutputServiceBusAccessKey")]
public async Task<Message> ProcessMessage(
[ServiceBusTrigger("%InputTopic%", "%InputSubscription%", Connection = "InputServiceBusAccessKey")]
Message message)
{
// stuff happening
}
When the input binding is incorrect, we simply notice the queue build up. However, when one of our deployment failed to configure the output binding for the servicebus correctly, we find that handling the message is successful in the logs (!). We expect the handling of the message to fail (Error in our logs and message in the dead-letter queue). We currently see the following success message:
Executed 'MyFunction' (Succeeded, Id=99914403-e968-46fc-9ea1-dbb7f81a3421, Duration=1ms)
This renders the output binding unusable, as an error in the deployment causes the Azure Function to fail silently.
What can we do to not have the Azure Function fail silently?