[QUERY] Message completion slower with AMQP vs NetMessaging transport #40981
Labels
Client
This issue points to a problem in the data-plane of the library.
customer-reported
Issues that are reported by GitHub users external to the Azure organization.
issue-addressed
Workflow: The Azure SDK team believes it to be addressed and ready to close.
question
The issue doesn't require a change to the product in order to be resolved. Most issues start as that
Service Bus
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
The text was updated successfully, but these errors were encountered: