I am using the defualt install of activeMQ 4.1.0
I've turned off persistence and increased memory-manager setting to 500MB
I've also updated the startup script so that the java heap can increase to
1G of memory if required

The messaging layer of my app is simple. The client creates a temp queue on
the broker and then sends messages async to a named main queue where each
message has the JMS reply to set to the temp queue. 

The server consumes messages from the main queue does some processing and
then sends the resulting message to the temp queue. The client then consumes
the messages off the temp queue.

On the server consuming messages is fast. However sending the results back
to the temp queue is slow.

The server consumes messages by creating a single connection, a single
session and a single consumer. All of these objects are created on startup
and the consumer has the main queue set on it when created. e.g.

        connection = connectionFactory.createConnection();
        session =
connection.createSession(false,Session.CLIENT_ACKNOWLEDGE);
        consumer = session.createConsumer(mainQueueName);
        connection.start();

In the appropriate place the following gets called

          jmsRequest = consumer.receive();
          jmsRequest.acknowledge();


The server produces messages by creating another connection, a session and a
single producer. All these objects are created on startup however the
producer has no queue set on it since it is not known until runtime. Hence
when the server sends a message back to the broker it calls


          producer.send(jmsRequest.getJmsReplyTo(), jmsResponse);

Now this is the major bottleneck in my application. Whereas the consumer can
consume 100 messages per second without breaking a sweat the producer is
only manage to send 50 a second back to the temp queue.

Is there any obvious things I can do to speed this up?

Why is it slow? Any ideas?


-- 
View this message in context: 
http://www.nabble.com/Sending-Async-messages-to-temp-queue-really-slow-tf3242950s2354.html#a9015159
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to