0
votes

I have a basic QueueTrigger Azure function. When I disable the function in the azure portal it's still pulling messages off the storage queue (because when I look at the queue in the Azure Queue Storage Explorer the queue is empty and if i add a message it is immediately pulled off).

Here is the code:

[FunctionName("ProcessMessage")]
public static void Run([QueueTrigger("queue-name", Connection = "queue-connection")] Models.Message message, TraceWriter log)
{
    log.Info($"C# Queue trigger function processed: {message}");
}

I noticed that when I stop the whole functions app it stops processing messages off the queue, but I was hoping that I could disable queue processing temporarily without stopping the whole function app. How does one do that?

Thanks!

1
Do you have V1 or V2 function app?Alexey Rodionov
it is a v1 function appcobolstinks

1 Answers

1
votes

Disabling the V1 function created in Visual Studio does not work in the azure portal. You should use the attribute:

https://docs.microsoft.com/en-us/azure/azure-functions/disable-function#functions-1x---c-class-libraries (see important section)