AmazonMQ ActiveMQ Performance Improvement with C#

221 views Asked by At

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 AmqpNETLite.Core as the client library for the same. AWS has documented its Queue benchmark here.

Amazon MQ Benchmark

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.
1

There are 1 answers

10
Justin Bertram On BEST ANSWER

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 (i.e. 25, 50, 100, or 200).

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