2

I have updated my Azure Functions from 3 to 4 version with .Net 6.0. After this change the function that processes the queue is not triggering when a new item is added. Locally the function works fine, but in Azure the function doesn't work, and no error is logged. I'm using Visual Studio 2022 to develop the functions with C#. I'm using Azure Queue Storage. Has anyone had to "fight" with that?

This is the class definition definition:

[FunctionName("ProcessQueueItems")] public static void Run([QueueTrigger("sales-dev", Connection = "AzureWebJobsStorage")] string myQueueItem, ILogger logger, ExecutionContext context)

I tried to deploy the function in a new Function App resource, but the problem persists. I need to the function app processes the queue items.

2
  • What have you tried so far? Is the connection string set correctly on you Azure Function App? Does the function running locally connect to the Azure Queue? Commented Apr 2, 2023 at 17:30
  • Did you ever find a solution to this? I seem to be having the same issue and cannot figure out what's going wrong. Commented May 21, 2023 at 22:43

1 Answer 1

0

Firstly, I have tested with .NET 3.1 v3 Azure Functions Queue Trigger working both locally and in Azure Cloud:

enter image description here

Migrated to .NET 6 v4 Azure Functions:
Changes:

  1. Changed the Target Framework and Azure Functions Version in .csproj file.
  2. Updated all the NuGet Packages w.r.t to v4 version

Testing Locally:
enter image description here

Testing in Cloud:

Click on Yes to update the target framework and Azure Functions version automatically to allocate the latest runtime environment in the Azure Cloud for the newly published/deployed.

enter image description here

After Running the Queue Trigger Function and sending the message in the Queue, observe the Monitor Tab located in the same page of the Azure Function App “Code+Test” Menu Portal:

enter image description here

Even for the Queue Trigger like in the above .NET 3.1 Cloud Test Result Screenshot, I’m able to get the Message in both the console and in monitor but sometimes I’m unable to get the result in Console but Monitor works perfectly as shown above and same mentioned in this GitHub Issue #99557.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanks a lot for your answer. Unfortunately, the problem was not resolved. I had updated the function app version but not the packages in my Visual Studio 2022 project, after that I have published the project in Azure, but the queue is full of new items that are not processed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.