I have recently started working with ActiveMQ (v5.9).  The performance I am
seeing with my producer is extremely slow and was wondering if someone could
shed some light on the matter. I have my broker, producer, and consumer all
running on the same machine. Furthermore, in an effort to get accurate
stats, in none of my tests have I ran the producer and consumer
simultaneously (i.e. I run the producer 1st and put a bunch of messages on
the bus, then shut down the producer and turn on the consumer).

1K messages with default settings (producerFlowControl=true,
useAsyncSend=false):
Producer: 2.5 seconds
Consumer: 0.16 seconds

My producer puts messages on the queue one at a time using a loop in Java
(calls JmsTemplate.convertAndSend).  I am aware of the prefetch
configuration setting for sending messages to the consumer, which by default
is set to 1000 (I have also tried explicitly setting it to 1000), so that
could explain some of the discrepancy here.  However, when I change the
prefetch setting to 0, which is supposed to do one message at a time, and at
least in my mind would emulate the producer's message generation speed, the
consumer slows down to ~0.56 seconds.  But this is still nowhere close to
the slow 2.5 seconds that the producer takes.

If I change my producer/broker settings so that no ack is sent to the
producer, then I can improve things significantly, but I need message
reliability so probably don't want to go down this route:

1K messages with useAsyncSend=true:
Producer: 0.2 seconds

On a related note, does anyone know if the numbers (21-22,000
messages/second)posted the  AMQ Performance Page
<http://activemq.apache.org/performance.html>   have useAsyncSend on or off?

Thanks in advance.
rostom



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/Very-slow-producer-tp4675669.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to