azure-sdk-for-net icon indicating copy to clipboard operation
azure-sdk-for-net copied to clipboard

[QUERY] Azure Service Bus: Time Spent in Queue is Large

Open punitganshani opened this issue 3 weeks ago • 3 comments

Library name and version

Azure.Messaging.ServiceBus

Query/Question

We have a .NET process where the process is subscribing to the Topic. One of the common observations is that the Time Spent in Queue is large.

Azure Service Bus is running with 2 Messaging Units. The usage of Service Bus is not high, but the messages are not being picked up. The Message Lock duration is 10-30 seconds for different queues.

The .NET code is running on AKS and is using Azure.Messaging.ServiceBus and the code appears like,


ServiceBusClient client = new ServiceBusClient("connectionString",new ServiceBusClientOptions());

ServiceBusProcessorOptions clientOptions = new ServiceBusProcessorOptions
            {
                AutoCompleteMessages = false
            };

ServiceBusProcessor processor = client.CreateProcessor("topicName", "subscription", clientOptions);

processor.ProcessMessageAsync += ProcessMessageHandler;
processor.ProcessErrorAsync += ProcessErrorHandler;

processor.StartProcessingAsync();

The time spent in queue is too much even if we run multiple pods. What is potential reason for the delay?

Service Bus Telemetry Service Bus Usage

Environment

.NET SDK: Version: 8.0.300 Commit: 326f6e68b2 Workload version: 8.0.300-manifests.5273bb1c MSBuild version: 17.10.4+10fbfbf2e

Deployment running on Azure Kubernetes Service with Linux

punitganshani avatar Jun 25 '24 02:06 punitganshani