I have been doing some tests reading from a Azure Service Bus Queue using the library Azure.Messaging.ServiceBus in .NET 6.
I want to preserve ordering (FIFO) when reading so I only use 1 ServiceBusReceiver.
I have done tests both with receiving one message at a time (ReceiveMessageAsync and then CompleteMessageAsync) and receiving batches (ReceiveMessagesAsync(x) followed by a loop with CompleteMessageAsync).
My tests shows that I only process around 5-10 msg/sec which seems very low.
If I comment out the CompleteMessageAsync statement the performance is a lot better. For example, when using a batch size of 10 the throughput is a bit over 100 msg/sec.
This tells me the bottleneck is in the CompleteMessageAsync method.
Can I do something about this and still maintain FIFO? A throughput of 5-10 msg/sec is way to low.