简体   繁体   中英

AmazonMQ ActiveMQ Performance Improvement with C#

We are using AmazonMQ using ActiveMQ in an ASP.NET Core Microservice that require high throughput. My message size is around 1KB. We are using Amq.NETLite.Core as the client library for the same. AWS has documented its Queue benchmark here.

亚马逊 MQ 基准

In my application, I am using only 1 producer. I tried sync Send and AsyncSend API of SenderLink .

Average time taken when sending 10000 messages to queue in AsyncSend is ~125ms and sync Send mode is ~25ms per message. When I tried using Transactions for 100 message batches in Sync mode, my average time reduced to ~15ms. This time taken is ~25 time poorer than the performance AWS is offering in the above benchmark for 25 producers.

I tried to use concurrentStoreAndDispatchQueues as false and transactions in an effort to improve performance to AWS's benchmark.

Can someone help me identify what I am doing wrong?

  1. I use only 1 producer. Does AWS imply I need 25 producers to achieve the above 1750 TPS?
  2. I use AMQP wire level protocol. But the benchmark is on openwire .

Using only 1 producer is going to artificially limit the performance as the overall throughput will be based solely on the throughput of that one producer. In order to at least attempt to get the same performance numbers you need to use the same number of producers and consumers as used in the original test (ie 25, 50, 100, or 200).

Also, performance will be different between AMQP and OpenWire simply because the protocol implementation on the broker is different.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM