I'm creating a proof of concept implementation in which I need to send files (sometimes large ones, up to 400Mb) embedded in messages using AMQP 1.0. I decided to use Apache's qpid proton client lib and qpid C++ broker.
The test setup has 3 parts: A sender program, the broker, and a receiver program. I'm using SSL for transport encryption and SASL for authentication. All parts run on the same box, connected through the loopback interface.
Everything works fine, except that the performance when sending files from the sender to the broker is really bad. Example: I sent a 140Mb message, and it took 90 seconds from the sender to the broker. The same message took only 2 seconds to deliver from the broker to the receiver.
The queue is not persistent, so no I/O bottlenecks.
I know that AMQP is not designed to send large messages, but seeing that it can actually deliver it fast enough on the receiving end, I figured it's capable of meeting my requirements, and I might be doing something wrong on the sending side.
So, the questions are:
- What could be causing this difference?
- Am I doing something wrong or is this the expected behavior?
- Is there any way to optimize the performance on the sending side?
I'm going crazy about this issue, so any help or idea that can point me to a solution is very welcomed. Thanks in advance!!!