jMeter - JMS Point To Point Test Plan

Advertisements


Building a JMS Point-to-Point Test Plan

Now let's write a JMeter test plan to test a JMS Point-to-Point messaging solution. The setup of the test is 1 threadgroup with 1 thread or user sending 2 messages each through a request queue.

First let's start the JMeter from /home/manisha/apache-jmeter-2.9/bin/jmeter.sh.

Add Users

Now create a Thread group, right click on Test Plan > Add> Threads(Users)> Thread Group. Thread Group will get added under the Test Plan node. Rename this Thread Group as JMSTestPlan-PointtoPoint.

Thread Group Added

We will change the Loop Count to 2. Rest of the default properties of the Thread Group are retained. This means that 1 threadgroup with 1 thread or user sends 2 messages each through a request queue.

Adding JMS Point-to-Point Sampler

Now that we have defined our users, it is time to define the tasks that they will be performing. Start by adding the sampler JMS Point-to-Point to the Point-to-Point element (Add > Sampler > JMS Point-to-Point). Then, select the JMS Point-to-Point sampler element in the tree. The following property changes are made to the JMS Point-to-Point sampler element:

PropertyValueDescription
QueueuConnectionFactoryConnectionFactoryThis is the default JNDI entry for the connection factory within active mq.
JNDI Name Request QueueQ.REQThe JNDI name for JMeter to make the connection between the connection factory and queue.
JNDI Name Receive QueueQ.REQThe JNDI name for JMeter to make the connection between the connection factory and queue. We are using the same queue for response.
Communication StyleRequest ResponseThis means that you need at least a service running outside of JMeter and that will respond to the requests. This service must listen to the Request Queue and send messages to the queue referenced by the message.getJMSReplyTo()
Use Request message ID checkedYou can leave JMeter to use the message ID Request (deposit) to the correlation between the incoming message and recovered.
Use Response message ID checkedYou can leave JMeter use the message identifier Response (recovery) for the correlation between the incoming message and recovered.
Time(milliseconds)2000This timeout is used when the message is received by JMeter if nothing is recovered in time (here 2 sec), then the item will be marked in error.
ContentTesting point to pointThis is just the content of the message.
InitialContextFactoryorg.apache.activemq.jndi
.ActiveMQInitialContextFactory
The standard InitialContextFactory for Active MQ
queue.Q.REQexample.ACorrespondence between the JNDI name of the queue (Q.REQ) and the real name of the queue in ActiveMQ (example.A).
Provider URLtcp://localhost:61616The address and port to attack ActiveMQ.

The screen shot below shows above configurations:

JMS Point to point sampler

Create Listener

Now add the Listener element. This element is responsible for storing all of the results of your JMS requests in a file and presenting a visual model of the data.

Select the Thread Group element and add a View Results Tree listener (Add > Listener > View Results Tree).

JMS Point to Point Test Listener

Save and Execute Test Plan

Now save the above test plan as jmsptp_test.jmx. Execute this test plan using Run > Start option.

Verify Output

JMS PTP Test Output JMS PTP Test Output JMS PTP Test Output

Return to the admin console of ActiveMQ, from this we can see message status in the queue.

JMS PTP Admin Console

Advertisements
Advertisements