Two questions/suggestions regarding your AMQ setup:

1) What is the average size (or range of sizes) of the actual message being 
sent from your producer?  If you are dealing with larger messages you may wish 
to consider sending Blob Messages instead of putting the entire payload inside 
of the message itself - see http://activemq.apache.org/blob-messages.html for 
more detail.  Determining what a "large" message is may vary, but once you 
start approaching 1MB you should definitely consider Blob Messages.

2) What is the network latency between your producer and your broker?  If it is 
substantial enough to affect the speed at which you can produce a message and 
receive acknowledgement from the broker, you could use a Network of Brokers 
between your producer and consumer such that one AMQ instance lives on the same 
host or at least on the same subnet as your producer and that instance is 
responsible for forwarding messages to another AMQ instance that your consumer 
consumes from.  See http://activemq.apache.org/networks-of-brokers.html for 
more.

On Jul 11, 2011, at 4:55 PM, MaryAuaun wrote:

> Boy, this forum is great for making me get my thoughts together and answering
> my own questions, but if anyone knows any more, please chime in!
> 
> For writing 1000 messages
> 
> Originally 1000 messages took 40 seconds.
> 
> Persistent vs. Non-Persistent didn't make much difference in speed
> 
> These settings made a little differenceoptions:
>                connectionFactory.setUseAsyncSend(true); // tbw to test
> speed
>                connectionFactory.setAlwaysSyncSend(false);
>                connectionFactory.setSendAcksAsync(true);
>                connectionFactory.setProducerWindowSize(100);
>      (some of these settings are poorly document or not documented at all!)
>  Now 1000 messages takes 27 seconds! 
> 
> I removed the "transacted" and commits, that made it much faster
>   1000 messages take about 6 seconds, even with Persistent on.
> 
> That's nos 166 messages / sec, which is not bad.  If there are other
> improvements I can make, please let me know!
> 
> 
> --
> View this message in context: 
> http://activemq.2283324.n4.nabble.com/Slow-and-fast-messages-tp3660295p3661071.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to