activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Lugt <>
Subject Re: Topic consumer appears throttled
Date Fri, 22 Sep 2006 20:30:05 GMT

Hi James, thanks for the quick reply.

Yes, I'm using NMS and C# for the client.  I wasn't specifying any
particular acknowledgement mode, so my previous tests would have been using
the default - but your question prompted me to try a few things out.

I found this article which describes acknowledgement modes for consumers:

I couldn't find a way to directly manipulate the consumer acknowledgement
mode using the NMS classes (if there is a way please tell me), so I used the
URI syntax on the GetTopic() method e.g. 

  IDestination destination =

Sorry, I don't know if I've got the syntax right, but it didn't make any
difference to the tests.  I also tried the value "dupsAck" because I read
somewhere that this could improve performance but it also didn't have any

The listener is async (delegate added to consumer.Listener) - and is very
light-weight.  I checked the CPU and memory activity on the client and the
server and both were comfortably under utilised.

Best regards
Rob Lugt

James.Strachan wrote:
> This sounds like it could be related to acknowledgements - you're
> using NMS and C# as the client right? What acknowledgement mode are
> you using and are you using the async or sync listener?
> On 9/22/06, Rob Lugt <> wrote:
>> Hi
>> I'm hoping to use AMQ for a stock price publishing system, so high
>> throughput and low latency are important factors.  To verify that the
>> kind
>> of throughput we are after is achievable I've created a very simple
>> producer/consumer pair based on the sample code in
>> I've come across a potential problem where the consumer's receive rate
>> dramatically falls after the number of enqueued messages exceeds a
>> certain
>> threshold.  I'm pretty sure I must be falling foul of a configuration
>> problem because the number 1000 seems to be significant.
>> If the publisher sends 1000 messages, the consumer happilly receives them
>> in
>> a couple fo seconds. But, if I configure the publisher to send 1500
>> messages
>> in quick succession, I see a perculiar pattern: the consumer receives the
>> first 300 messages quickly, it then receives the next 200 messages very
>> slowly (approx 5 msgs/s) until there are exactly 1000 messages left in
>> the
>> queue and then it speeds through the last 1000 in just 2 seconds. If I
>> increase the number of messages sent, the same pattern remains i.e. the
>> consumer runs slowly until only 1000 messages remain then speeds up!
>> Topology:
>>   Client 1 and Client 2 both running on a single workstation, connecting
>> via
>> OpenWire using NMS
>>   AMQ 4.0.1 Broker running on separate machine (Windows 2003 Server, J2SE
>> 1.5.0_06)
>> Client 1 opens a session and publishes n (non-persistent) messages to a
>> single topic.
>> Client 2 opens a session and registers a listener on the same topic.
>> I've tried various options to overcome this, none of which seem to have
>> had
>> any impact.
>> On connection uri I have:
>> jms.useAsyncSend=true&consumer.dispatchAsync=false
>> On Topic name I have: jms.useAsyncSend=true&consumer.dispatchAsync=false
>> Any ideas/solutions gratefully received.
>> Best regards
>> Rob Lugt
>> --
>> View this message in context:
>> Sent from the ActiveMQ - User mailing list archive at
> -- 
> James
> -------

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

View raw message