Azure queue message never makes it to function app in dotnet core 6

62 Views Asked by At

I'm trying to port an application over from dotnet framework to dotnet core, one of the functions of the application publishes a message to an azure queue, which is ultimately picked up by a function app. The relevant part of the application looks like this and uses Azure.Storage.Queues v12.13.0 (I've also tested with 12.14.0):

public class Message
{
    public string AccessToken { get; set; }
    public string Id { get; set; }
    public string Trace { get; set; }
}

private void Publish(Message message)
{
    QueueClient client = new QueueClient(CONN_STR, "my-queue");
    client.CreateIfNotExists();
    client.SendMessage(JsonConvert.SerializeObject(message));
}

The function app looks like this:

public class Request
{
    public string AccessToken { get; set; }
    public Guid Id { get; set; }
    public string Trace { get; set; }
}

public async void Publish([QueueTrigger("my-queue")]Request request)
{
    logger.Info("Publish called " + request.ToString());
}

In the framework version of the application this works exactly as expected. In the core version of the application, using Azure Storage Explorer I can see the message enters the queue, but then after some amount of time is put into a queue called 'my-queue-poison'.

The curious part is that if I use Azure Storage Explorer and copy the message contents from the poison queue and then add that message back to the regular queue, the function app executes as expected. The caused me to think that maybe the dotnet core queue client wasn't working, but after trying the latest version of the package it also fails

0

There are 0 best solutions below