View RSS Feed


Understanding JMeter Element- JMS Point to Point Sampler

Rate this Entry
by , 06-21-2015 at 02:21 AM (723 Views)
Understanding JMeter Element- JMS Point to Point Sampler

This sampler sends and optionally receives JMS Messages through point-to-point connections (queues). It is different from pub/sub messages and is generally used for handling transactions.
Request Only will typically used to put load on a JMS System.

Request Response will be used when you want to test response time of a JMS service that processes messages sent to the Request Queue as this mode will wait for the response on the Reply queue sent by this service.

Versions of JMeter after 2.3.2 use the properties java.naming.security.[principal|credentials] - if present - when creating the Queue Connection. If this behaviour is not desired, set the JMeter property JMSSampler.useSecurity.properties=false
JMeter does not include any JMS implementation jar; this must be downloaded from the JMS provider and put in the lib directory


Name- Descriptive name for this element that is shown in the tree.
QueueConnection Factory- The JNDI name of the queue connection factory to use for connecting to the messaging system.
JNDI Name Request queue- This is the JNDI name of the queue to which the messages are sent.
JNDI Name Reply queue- The JNDI name of the receiving queue. If a value is provided here and the communication style is Request Response this queue will be monitored for responses to the requests sent.
JMS Selector- Message Selector as defined by JMS specification to extract only messages that respect the Selector condition. Syntax uses subpart of SQL 92.
Communication style- The Communication style can be Request Only (also known as Fire and Forget) or Request Response:
Request Onlywill only send messages and will not monitor replies. As such it can be used to put load on a system.
Request Responsewill send messages and monitor the replies it receives. Behaviour depends on the value of the JNDI Name Reply Queue. If JNDI Name Reply Queue has a value, this queue is used to monitor the results. Matching of request and reply is done with the message id of the request and the correlation id of the reply. If the JNDI Name Reply Queue is empty, then temporary queues will be used for the communication between the requestor and the server. This is very different from the fixed reply queue. With temporary queues the sending thread will block until the reply message has been received. With Request Response mode, you need to have a Server that listens to messages sent to Request Queue and sends replies to queue referenced by message.getJMSReplyTo().
Use alternate fields for message correlation- These check-boxes select the fields which will be used for matching the response message with the original request.
Use Request Message Id- if selected, the request JMSMessageID will be used, otherwise the request JMSCorrelationID will be used. In the latter case the correlation id must be specified in the request.
Use Response Message Id- if selected, the response JMSMessageID will be used, otherwise the response JMSCorrelationID will be used.
There are two frequently used JMS Correlation patterns:
JMS Correlation ID Pattern - i.e. match request and response on their correlation Ids => deselect both checkboxes, and provide a correlation id.
JMS Message ID Pattern - i.e. match request message id with response correlation id => select "Use Request Message Id" only.

In both cases the JMS application is responsible for populating the correlation ID as necessary.
if the same queue is used to send and receive messages, then the response message will be the same as the request message. In which case, either provide a correlation id and clear both checkboxes; or select both checkboxes to use the message Id for correlation. This can be useful for checking raw JMS throughput.

Timeout- The timeout in milliseconds for the reply-messages. If a reply has not been received within the specified time, the specific testcase failes and the specific reply message received after the timeout is discarded. Default value is 2000 ms.
Expiration- The expiration time (in milliseconds) of the message before it becomes obsolete. If you do not specify an expiration time, the default value is 0 (never expires).
Priority- The priority level of the message. There are ten priority levels from 0 (lowest) to 9 (highest). If you do not specify a priority level, the default level is 4.
Use non-persistent delivery mode? - Whether to set DeliveryMode.NON_PERSISTENT.
Content- The content of the message.
JMS Properties- The JMS Properties are properties specific for the underlying messaging system. You can setup the name, the value and the class (type) of value. Default type is String. For example: for WebSphere 5.1 web services you will need to set the JMS Property targetService to test webservices through JMS.
Initial Context Factory- The Initial Context Factory is the factory to be used to look up the JMS Resources.
JNDI properties- The JNDI Properties are the specific properties for the underlying JNDI implementation.
Provider URL- The URL for the jms provider.

Disclaimer: The article/post is posted with the purpose of sharing knowledge and information.
The article may contain references, extract or content from other informative sources.
Researched/Authored/Compiled by -
Ronak Shah
Practice Head - Software Testing (QA), CIGNEX Datamatics

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 04:07 AM.

Copyright BetaSoft Inc.