azure-service-bus-dotnet icon indicating copy to clipboard operation
azure-service-bus-dotnet copied to clipboard

SessionClient.AcceptMessageSessionAsync is very slow in the .net Standard 1.x

Open amit-kumar2 opened this issue 6 years ago • 3 comments

Actual Behavior

In the .net Standard framework based SessionClient.AcceptMessageSessionAsync method call is very slow. It takes somewhere from 1500 ms to 3500 ms to accept and start a session with the Azure Service Bus Queue.

On the other hand QueueClient.AcceptMessageSessionAsync in full .net framework based WindowsAzure.ServiceBus.dll runs in less than 200 ms.

Expected Behavior

  1. SessionClient.AcceptMessageSessionAsync should be as performant as the .net full framework version

Versions

  • OS platform and version:
  • .NET Version: .net Standard 1.3
  • NuGet package version or commit ID: "Microsoft.Azure.ServiceBus" Version="1.0.0"

amit-kumar2 avatar Nov 21 '17 18:11 amit-kumar2

@amit-kumar2 There is a slight difference in latency between sbmp and amqp. But it shouldn't be this much. Could you test the same code with amqp protocol using older WindowsAzure.ServiceBus client

nemakam avatar Dec 29 '17 22:12 nemakam

I'm not sure what constitutes "older" but I am using:

Path: ..\packages\WindowsAzure.ServiceBus.4.1.8\lib\net45\Microsoft.ServiceBus.dll
Version: 3.0.0.0
Description: ServiceBus-Messaging ClientSDK_hotfix (a05f0f824a) 

I am calling:

QueueClient.AcceptMessageSessionAsync(string sessionId)

If I create my MessagingFactory using TransportType.Ampq it takes ~10 times longer to create a session than when using TransportType.NetMessaging.

Here are a couple of excerpts from my timing logs. I have been get results like these consistently over the last few days of testing.

2018-03-31 12:12:44 Took 912 ms to create session using TransportType.NetMessaging.
2018-03-31 12:16:36 Took 10841 ms to create session using TransportType.Ampq.

HTH

DarinMacRae avatar Mar 31 '18 12:03 DarinMacRae

@DarinMacRae WindowsAzure.ServiceBus is the old library (https://github.com/Azure/azure-service-bus) Microsoft.Azure.ServiceBus is the new library (this repo/issue tracker)

SeanFeldman avatar Mar 31 '18 14:03 SeanFeldman