activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpeng <>
Subject Configuring Distributed Queues in Store/Forward Network
Date Thu, 07 Oct 2010 20:36:07 GMT

I am trying to setup distributed queue with a network of 3 brokers. 1
producer, 1 fast consumer and 1 slow consumer. I cannot figure out how to
configure ActiveMQ distribute the messages properly. It seems that messages
are dispatched to each consumer regardless of how fast a consumer processes
a message. 

Here are some details on the configuration:
 -Message are non-persistent. 
 -Producer flow control is turned off. 
 -Prefetch is set to 1


Test Case:
 -The producer populates the queue with 100 messages. 
 -The fast consumer takes 50ms to process each message in the queue.
 -The fast consumer takes 500ms to process each message in the queue. 

Expected Result:
 -The fast consumer will process more messages than the slow consumer

Actual Result:
 -The slow consumer 49 messages and fast consumer 51 messages.
 - The fast consumer completed process well ahead of the slow consumer but
the slow consumer was dispatched half of the messages.


Here is the test class and the logs from execution. amq.log 


Anyone have any ideas on how to configure the distributed queue so that
messages can be dispatched to consumers based upon how fast they can

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

View raw message