I am creating a simple queue triggered azure function using Visual Studio. I am connecting it with my storage account, but for some reason its not working. Any help is appreciated.
This is my code: (auto-generated by VS)
[FunctionName("QueueTest")]
public static void Run([QueueTrigger("my-queue", Connection = "")]string myQueueItem, TraceWriter log)
{
log.Info($"C# Queue trigger function processed: {myQueueItem}");
}
This is my local.settings.json
{
"IsEncrypted": false,
"Values":{
"AzureWebJobsStorage":"DefaultEndpointsProtocol=https;AccountName=accountname;AccountKey=accountkey"
}
}
So I figured out the issue. All the configurations were fine. The issue was, Azure Function Version of my function app was 1 but for some reason, probably because of latest SDK/WebJobs, version 1 was not working correctly. So I had to create another function app with AzureFunctionVersion 2 and all worked fine.