Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

activemq performance gotchas and precautions

I am going to use ActiveMQ for the first time in one of my projects (topics for durable messages). I have read that durable messages enforce a limit to the scale of number of messages per second. What are the other factors that I should be aware of (e.g. slow consumers) that puts a limit to the scale and performance characteristics of activemq and what metrics should be closely monitored and what are the values at which all hell breaks lose.

I don't expect to be pushing more than a thousand events per second in ActiveMQ for now.

like image 919
142857 Avatar asked Sep 18 '11 18:09

142857


People also ask

Is ActiveMQ push or pull?

ActiveMQ will push as many messages to the consumer as fast as possible, where they will be queued for processing by an ActiveMQ Session. The maximum number of messages that ActiveMQ will push to a Consumer without the Consumer processing a message is set by the pre-fetch size.


1 Answers

here are a few tips...

  • increase your systemUsage limits from the defaults
  • increase your JVM heap size from the defaults
  • if using KahaDB, consider setting enableJournalDiskSyncs to false (helps throughput dramatically) or preferably use the new LevelDB
  • learn about producer flow control and consider disabling (frequently done)
  • consider using virtual topics (instead of durable topic consumers)
  • learn about prefetch-limit and tweak as needed
like image 105
Ben ODay Avatar answered Oct 22 '22 08:10

Ben ODay