git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Consume rate drops dracstically with message process latency, even with many consumers per queue.


That was my initial thought also, so we had already set prefetch limit = 1,
which i think is the lowest allowed value, to run our tests:

ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy(); 
prefetchPolicy.setAll(1); 
connectionFactory.setPrefetchPolicy(prefetchPolicy); 

With a value of '0' we get the following error:
javax.jms.JMSException: Illegal prefetch size of zero. This setting is not
supported for asynchronous consumers please set a value of at least 1.


My understanding is that different consumer sessions are not running on
different threads.
I added a debug log in the "onConsume" function of each consumer to
validate:

onConsume(Message message) {
  logger.info(Thread.currentThread().getName())
}

which prints the following unique entries:

ActiveMQ Session Task-1
ActiveMQ Session Task-2
....
ActiveMQ Session Task-100

As i understand, even though i have created 1200 consumer sessions there are
only 100 threads running.

What do you think?



--
Sent from: http://activemq.2283324.n4.nabble.com/ActiveMQ-User-f2341805.html