View RSS Feed


Understanding JMeter Element- JMS Subscriber Sampler

Rate this Entry
by , 06-21-2015 at 02:20 AM (1055 Views)
Understanding JMeter Element- JMS Subscriber Sampler

JMS Publisher will subscribe to messages in a given destination (topic or queue). For those not familiar with JMS, it is the J2EE specification for messaging. There are numerous JMS servers on the market and several open source options.

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.
use JNDI properties file- use jndi.properties. Note that the file must be on the classpath - e.g. by updating the user.classpath JMeter property. If this option is not selected, JMeter uses the "JNDI Initial Context Factory" and "Provider URL" fields to create the connection.
JNDI Initial Context Factory- Name of the context factory
Provider URL- The URL for the jms provider
Destination- the message destination (topic or queue name)
Durable Subscription ID- The ID to use for a durable subscription. On first use the respective queue will automatically be generated by the JMS provider if it does not exist yet.
Client ID- The Client ID to use when you you use a durable subscription. Be sure to add a variable like ${__threadNum} when you have more than one Thread.
JMS Selector- Message Selector as defined by JMS specification to extract only messages that respect the Selector condition. Syntax uses subpart of SQL 92.
Setup- The destination setup type. With At startup, the destination name is static (i.e. always same name during the test), with Each sample, the destination name is dynamic and is evaluate at each sample (i.e. the destination name may be a variable)
Authentication- Authentication requirement for the JMS provider
User- User Name
Password- Password
Number of samples to aggregate- number of samples to aggregate
Read response- should the sampler read the response. If not, only the response length is returned.
Timeout- Specify the timeout to be applied, in milliseconds. 0=none. This is the overall aggregate timeout, not per sample.

Client- Which client implementation to use. Both of them create connections which can read messages. However they use a different strategy, as described below:
MessageConsumer.receive() - calls receive() for every requested message. Retains the connection between samples, but does not fetch messages unless the sampler is active. This is best suited to Queue subscriptions.
MessageListener.onMessage() - establishes a Listener that stores all incoming messages on a queue. The listener remains active after the sampler completes. This is best suited to Topic subscriptions.

Stop between samples? - If selected, then JMeter calls Connection.stop() at the end of each sample (and calls start() before each sample). This may be useful in some cases where multiple samples/threads have connections to the same queue. If not selected, JMeter calls Connection.start() at the start of the thread, and does not call stop() until the end of the thread.
Separator- Separator used to separate messages when there is more than one (related to setting Number of samples to aggregate). Note that \n, \r, \t are accepted.

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 03:55 PM.

Copyright BetaSoft Inc.