I need a high performance message bus for my application so I am evaluating performance of ZeroMQ
, RabbitMQ
and Apache Qpid
. To measure the performance, I am running a test program that publishes say 10,000 messages using one of the message queue implementations and running another process in the same machine to consume these 10,000 messages. Then I record time difference between the first message published and the last message received.
Following are the settings I used for the comparison.
RabbitMQ
: I used a "fanout" type exchange and a queue with default configuration. I used the RabbitMQ C client library.ZeroMQ
: My publisher publises totcp://localhost:port1
withZMQ_PUSH
socket, My broker listens ontcp://localhost:port1
and resends the message to tcp://localhost:port2 and my consumer listens ontcp://localhost:port2
usingZMQ_PULL
socket. I am using a broker instead of peer to to peer communication inZeroMQ
to to make the performance comparison fair to other message queue implementation that uses brokers.Qpid
C++ message broker: I used a "fanout" type exchange and a queue with default configuration. I used the Qpid C++ client library.
Following is the performance result:
RabbitMQ
: it takes about 1 second to receive 10,000 messages.ZeroMQ
: It takes about 15 milli seconds to receive 10,000 messages.Qpid
: It takes about 4 seconds to receive 10,000 messages.
Questions:
- Have anyone run similar performance comparison between the message queues? Then I like to compare my results with yours.
- Is there any way I could tune
RabbitMQ
orQpid
to make it performance better?
Note:
The tests were done on a virtual machine with two allocated processor. The result may vary for different hardware, however I am mainly interested in relative performance of the MQ products.