We choose ActiveMQ as our JMS provider.
- Copy activemq-core-5.2.0.jar, jms-1.1.jar, and geronimo-j2ee-management_1.0_spec-1.0.jar into JMeter's lib directory.
- Create a jndi.properties file and jar it into a jar file, put the jar file into JMeter's lib directory.
- Confiture the JMS publisher sampler with the following settings in the JMeter GUI.
- Check use jndi.properties
- Connection Factory: ConnectionFactory
- Topic: MyTopic
- Number of messages to aggregate: 1
java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url=tcp://hostname:61616
topic.MyTopic=topic
There are a few catches during the setting up process:
* The ActiveMQInitialContextFactory package name must have the apache.
* ConnectionFactory can not contain any trailing space.
* The Topic JNDI name must be prefixed with topic in the jndi file.
* You must put in the Number Of messages to aggregate, otherwise there will be no messages published.
7 comments:
This blog has ended my long day of misery. Thanks for you.
Wow!! I tried out multiple alternatives, but this worked out straight away. Thanks.
Thanks, that's a nice hint to put jndi.properties in a .jar file :))
thanks a lot... i have been spending painstaking hours to get this work.
How I should exactly jar jndi.properties into .jar file? If You don't mind. Thanks!
THANK YOU! You have saved my sanity. I don't think I ever would have guessed that the jndi.properties file needed to be packaged in a jar file, and not simply dropped in the lib dir. I Was about to debug into jmeter code or jump out the window. Very helpful!
Previous commenter -- Create a jar file as follows:
jar cvf my-jndi-properties.jar jndi.properties
Post a Comment