Open jsquire opened 5 months ago
//cc: @EldertGrootenboer
Thank you for your feedback. We have opened an investigation task for this in our backlog, and will update this issue when we have more information.
This item in our backlog, however we currently don't have an ETA on when development might start on this. For now, to help us give this the right priority, it would be helpful to see others vote and support this item.
Issue Transfer
This issue has been transferred from the Azure SDK for .NET repository, #40981.
Please be aware that @michaelmcmaster is the author of the original issue and include them for any questions or replies.
Details
Library name and version
Azure.Messaging.ServiceBus 7.16.2
Query/Question
Background
I have an application that makes heavy use of ServiceBus sessions. I'm updating the application's ServiceBus client library from
WindowsAzure.ServiceBus
toAzure.Messaging.ServiceBus
and testing is showing a reduction (roughly half as many messages/second) in performance using the newerAzure.Messaging.ServiceBus
client. After significant tinkering and benchmarking, it appears the performance reduction is related to the "transport type" being used by the client; the AMQP transport takes roughly twice as long to perform the messageComplete
operation.This "slow completion" (aka. message settlement) behavior is alluded to in #13920 as well, but doesn't have any resolution. My goal is to get the
Azure.Messaging.ServiceBus
client to the same performance level as the olderWindowsAzure.ServiceBus
client, but all the experiments I've tried... aside from scaling out the number of concurrent sessions... have proved fruitless. I've tried client-per-thread (instead of singleton), I've tried a range of Prefetch (0 to 100, settled on 10), I've tried using theProcessor
(instead ofReceiver
), and I've tested just a single session w/single thread... across all the experiments, the client'sComplete
method is significantly slower when using AMQP transport.Benchmark Scenario
Setup
duplicate detection
enabled,message ordering
enabled)requires session
enabled)Client Pseudocode
PrefetchCount
to10
Accept
a message sessionReceive
a single message (usingPeekLock
)Receive
returns null (no message)Benchmark Results
WindowsAzure.ServiceBus
7.0.1
TransportType:
NetMessaging
(client default):TransportType:
Amqp
(set via connection string):Azure.Messaging.ServiceBus
7.16.2
TransportType:
Amqp
(client default):Observation
Comparing the
NetMessaging
transport (WindowsAzure.ServiceBus) against theAmqp
transport (both old and new) libraries, the old NetMessagingReceive
average is slightly slower... but theComplete
is much faster.Question
I've tuned the client's options within the constraints of the application's design. Is there anything that can be done to improve the
Azure.Messaging.ServiceBus
client'sComplete
performance?Environment
Windows 10, .NET Framework 4.8.9181.0, x64