1
votes

I'm wanting to create test load onto a Websphere MQ queue using JMeter. I'm only wanting to place a message onto a queue - so I'm using the JMS Publisher sampler. The config items I have are: MQHost:Port, MQChannel, MQQueueManager, MQQueue

In the sample, I've entered in some of the settings: Provider URL: tcp://MQHost:Port Destination: MQQueue

For the MQChannel and MQQueueManager I've added them into the JMS properties seetings:

Name: WMQ_QUEUE_MANAGER , Value: MQQueueManager, Class of value: java.lang.String Name: WMQ_CHANNEL, Value: MQChannel, Class of value: java.lang.String

I've got Connection Factory set as: MQConnectionFactory

Now the issue I'm racking my brains with is the Initial Context Factory setting. I'm stumped as to what package/class this should be set to.

The other option is to create a jndi.properties file with the MQ connection settings, but unclear as to how to do this either.

JMeter JMS Publisher Sampler

Thank you.

1
I spent far too long on trying to create a MQ performance test using this approach, and instead went about the approach using JMS administered objects and accessing via File system JDNI. I found information on these links helpful: - leakfromjavaheap.blogspot.co.nz/2014/07/… - shekup.blogspot.co.nz/2009/06/…Naca

1 Answers

0
votes

According to the documentation it should be

com.ibm.websphere.naming.WsnInitialContextFactory

Also looking into your test plan you seem to be using incorrect syntax for JMeter Variables, i.e. you should be using ${MQHost} instead of MQHost.

Remember that JMeter doesn't come with any MQ jars, you need to get them somewhere somehow and drop to JMeter's CLASSPATH (usually "lib" folder of your JMeter installation, however it's configurable)

See Building a JMS Testing Plan - Apache JMeter article for extended information and end-to-end instructions.