activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apuschmann <>
Subject Activemq vs. Rabbitmq, performance Peaks
Date Mon, 27 Jun 2011 11:28:56 GMT

I have done some performance testing between activme and rabbitmq. First of
all, I use ActiveMQ 5.4.0 on a Dual Core 1,8 and 2GB using kahadb, and a
default configuration. I tested how fast activemq and rabbitmq can write and
read messages from a persistence queue with a message size of ca. 1KB. Both
tests were under the same situation. On Activemq i found out that after
every third meter record there is a high processing time, some times it is
very high. This behaviour occurs both sending and consuming. Without this
peaks activemq were much faster than rabbitmq in my case.
Ok my testcase, i sended 3000 messages and measured the time for sending
these 3000 messages. The messages were always the same.

Looking at this picture.

Can somebody can tell me why these peaks occurs or what i can do against it?

Here my testing code:

    public void run() throws JMSException

      String brokerURL = "tcp://localhost:61616?jms.useAsyncSend=true";
      ConnectionFactory factory = new ActiveMQConnectionFactory(brokerURL);
      connection = factory.createConnection();
      session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
      Destination destination = session.createQueue(queueName);
      producer = session.createProducer(destination);


    	int i=0, j=0;
    	long start = System.currentTimeMillis();
			Message message = session.createTextMessage(Producer.message);
	    	if(i == 3000)
	    		System.out.println("The last 3000 Messages needed " +
(System.currentTimeMillis() - start));
	    		start = System.currentTimeMillis();

View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message