【发布时间】:2020-01-14 12:03:11
【问题描述】:
我们正在升级应用程序以使用 ActiveMQ(经典,版本 5.15.9)。 因此,我们正在调整现有的 JMeter(3.1 版)测试以使用 ActiveMQ。在 JMS Sampler 中,属性已被修改并设置如下:
- 初始上下文工厂 = org.apache.activemq.jndi.ActiveMQInitialContextFactory
- 上下文提供程序 URL = tcp://[MyHost]:61616
- 队列连接工厂 = ConnectionFactory
- 发送队列 = queue.MyApp.RequestQueue
- 接收队列 = queue.MyApp.ResponseQueue
不过,我在 JMeter 日志中收到以下错误(即使功能测试与 ActiveMQ 独立和队列一起工作):
错误 - jmeter.protocol.jms.sampler.JMSSampler: queue.MyApp.RequestQueue javax.naming.NameNotFoundException: queue.MyApp.RequestQueue
在 org.apache.activemq.jndi.ReadOnlyContext.lookup(ReadOnlyContext.java:235)
在 javax.naming.InitialContext.lookup(InitialContext.java:417)
在 org.apache.jmeter.protocol.jms.sampler.JMSSampler.threadStarted(JMSSampler.java:337)
在 org.apache.jmeter.threads.JMeterThread$ThreadListenerTraverser.addNode(JMeterThread.java:659)
在 org.apache.jorphan.collections.HashTree.traverseInto(HashTree.java:996)
在 org.apache.jorphan.collections.HashTree.traverse(HashTree.java:978)
在 org.apache.jmeter.threads.JMeterThread.threadStarted(JMeterThread.java:628)
在 org.apache.jmeter.threads.JMeterThread.initRun(JMeterThread.java:616)
在 org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:245)
在 java.lang.Thread.run(Thread.java:745)
有没有想过我可能错过了什么?
【问题讨论】: