I have the following Http Triggered Azure Function to send data into the queue. But how can I see the behaviour that Azure Service Bus does not guarantee FIFO order?
I am using a peek-lock receiving behaviour. Assuming I have messages 1,2,3,4 in the queue. If my application failed when receiving message 1, how does Azure Function react due to its concurrency? Will there be another thread that reads message 2 while message 1 timeout?
[FunctionName("ServiceBusFunction")]
public static void Run([ServiceBusTrigger("testQueueDuplicateDetection")] string myQueueItem, ILogger log)
{
log.LogInformation($"C# ServiceBus queue trigger function processed message: {myQueueItem}");
}
[FunctionName("ServiceBusOutput")]
[return: ServiceBus("testQueueDuplicateDetection")]
public static string ServiceBusOutput([HttpTrigger] string input, ILogger log)
{
log.LogInformation($"C# function processed: {input}");
return input;
}
Thanks in advance!