blob: aed4dcf43f4ff8e98cb5cca413ab7b13f5ad154a [file] [log] [blame]
<div class="wiki-content maincontent"><h3>JMeter performance test</h3>
<p>You can use JMeter to test the performance of your ActiveMQ Server. Please refer to the <a shape="rect" href="http://jakarta.apache.org/jmeter/">JMeter site</a> for detailed instructions on using this software.</p>
<h3>Downloading the JMeter Performance Test Binary</h3>
<p>You can download the latest activemq-jmeter-*.zip distribution from the following</p>
<ul><li><a shape="rect" href="http://people.apache.org/repository/incubator-activemq/distributions/">Apache ActiveMQ versions</a></li><li><a shape="rect" href="http://dist.codehaus.org/activemq/distributions/">3.x versions of ActiveMQ</a>.</li></ul>
<h3>Building the JMeter Performance Test from source</h3>
<p>1. Check out the latest head version of ActiveMQ from <link><page ri:content-title="Source"></page></link>. Build from source.</p>
<p>2. Run maven from the JMeter directory. This will build JMeter into the target directory.</p>
<p>3. Run JMeter.bat from the \bin directory to start JMeter.</p>
<p>4. There are sample Test Plans located at \bin\testfiles directory that you could open to test ActiveMQ.</p>
<h3>Building a Test Plan</h3>
<p>For a Producer Sampler<br clear="none">
1. Add a Thread Group.<br clear="none">
2. Add the producer sampler "Producer Sampler" from the Sampler menu.<br clear="none">
3. Highlight the Producer Sampler then right click to add the producer listener "View Producer Results" from the Listener menu.<br clear="none">
4. Go to the Thread Group element and set the Number of Threads, Ramp-Up Period and Loop Count to 1.</p>
<p>For a Consumer Sampler<br clear="none">
1. Add a Thread Group.<br clear="none">
2. Add the consumer sampler "Consumer Sampler" from the Sampler menu.<br clear="none">
3. Highlight the Consumer Sampler then right click to add the consumer listener "View Consumer Results" from the Listener menu.<br clear="none">
4. Go to the Thread Group element and set the Number of Threads, Ramp-Up Period and Loop Count to 1.</p>
<h3>The JMeter Performance Test Module consists of:</h3>
<p>1. JMeter Producer Sampler</p>
<ul class="alternate"><li>A JMeter Sampler tells JMeter to send requests to the server. Pluggable Samplers allow unlimited testing capabilities.</li></ul>
<ul class="alternate"><li>The Producer Sampler will send messages to an ActiveMQ Server.</li></ul>
<p>The Producer Sampler has the following parameters:</p>
<ul class="alternate"><li>Server URL - defines the server url i.e. tcp://localhost:61616</li><li>Duration (min) - the duration of the test.</li><li>Ramp Up (min) - the time in which the Producer will reach it's stable/peak state.</li><li>No. of Producer - The number of Producer that would be sending the message.</li><li>No. of Subject - The number of Subject that would be created then send. Note that the number of Subject should be less than or equal to the No. of Producer.</li><li>Message Size (bytes) - The size of the message to send.</li><li>Delivery Mode - Default is Non-Persistent.</li><li>Messaging Domain - Default is Topic</li><li>Message Interval - Default/Custom Interval. When Custom Interval was Selected user must provide Interval Value (mins).</li><li>Message Queue Servers - List of available MQ Servers.</li></ul>
<p>2. JMeter Producer Listener</p>
<ul class="alternate"><li>Listeners provide access to the information JMeter gathers about the test cases while JMeter runs.</li><li>The Producer Listener would provide statistics with the number of messages sent and average messages per second.</li></ul>
<p>3. JMeter Consumer Sampler</p>
<p>The Consumer Sampler has the following parameters:</p>
<ul class="alternate"><li>Server URL - defines the server url i.e. tcp://localhost:61616</li><li>Duration (min) - the duration of the test.</li><li>Ramp Up (min) - the time in which the Producer will reach it's stable/peak state.</li><li>No. of Consumer - The number of Consumer that would be sending the message.</li><li>No. of Subject - The number of Subject that would be created then send. Note that the number of Subject should be less than or equal to the No. of Consumer.</li><li>Delivery Mode - Default is non-Durable.</li><li>Messaging Domain - Default is Topic.</li><li>Message Queue Servers - List of available MQ Servers.</li></ul>
<p>4. JMeter Consumer Listener</p>
<ul class="alternate"><li>The Consumer Listener would provide statistics with the number of messages received and average messages per second.</li></ul>
</div>