环境参数
ActiveMQ版本:apache-activemq-5.9.0
Jmeter版本:apache-jmeter-2.12
参数配置
1、 将%ActiveHome%/lib下的jar拷贝到%JMeterHome%/lib下,主要涉及以下jar包:
activemq-all-5.9.0.jar
insight-log4j-7.2.0.redhat-024-patched
slf4j-api-1.7.5.jar
jcl-over-slf4j-1.7.5
insight-log-core-7.2.0.redhat-024
2、运行%JMeterHome%/bin/jmeter.bat
3、测试计划-线程组-Sampler-JMS Point-to-Point
4、
JMS Resources项配置参数:
QueueConnection Factory: connectionFactory
JNDI name Request queue:MyQueue
JNDI name Receive queue:MyQueue
5、
Message Properties项配置参数:
Communication style:Request Only
其他参数自定义
6、JNDI Properties项配置参数:
initial Context Factory:org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url = tcp://localhost:8161
connectionFactoryNames = connectionFactory
queue.MyQueue = example.MyQueue
7、 添加“监听器”