I have the following code to send messages to the bus:
var queueClient = new QueueClient(ServiceBusConnectionString, QueueName);
var message = new Message(poco.SerializeToBytes());
await queueClient.SendAsync(message);
But they seem to be going straight into the DEAD-LETTER MESSAGE COUNT:
I have also created an Azure function which will pick messages up:
[FunctionName("ServiceBusFunction")]
public static void Run([ServiceBusTrigger("schedule", AccessRights.Listen, Connection = "ServiceBusConnection")]byte[] myQueueItem, TraceWriter log)
{
log.Info($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
}
When I turn the function off, the messages were go into the ACTIVE MESSAGE COUNT before I created this function. I've tried running the function locally and the function was not being hit. I feel like I'm missing something fundamental in terms of picking up messages on the bus from a function?