[英]How can JMS Point-to-Point Sampler be used in Jmeter to send messages to an IBM MQ queue
I have a local IBM MQ instance set up with some default queues.我有一个设置了一些默认队列的本地 IBM MQ 实例。
Using JMeter 5.4.1, I first want to send messages to one of these queues to test that the connection works.使用 JMeter 5.4.1,我首先想将消息发送到这些队列之一以测试连接是否有效。
1. Is it possible with IBM MQ or does it only work with Active MQ? 1. 是否可以与 IBM MQ 一起使用,还是只能与 Active MQ 一起使用?
The test scenario I wish to achieve is this:我希望实现的测试场景是这样的:
2. Is this achievable with JMS Point-to-Point Sampler? 2. 这可以通过 JMS 点对点采样器实现吗?
I've checked the official JMeter documentation, but I don't understand what connection details I need to place in each of the sampler's configuration fields.我已经查看了官方的 JMeter 文档,但我不明白我需要在每个采样器的配置字段中放置哪些连接详细信息。
JMS Resources
QueueConnection Factory:
JNDI name Request queue:
JNDI name Receive queue:
Number of samples to aggregate
JMS Selector
....
etc...
I was able to connect to one queue and send messages using custom code in a JSR223 Sampler.我能够连接到一个队列并使用 JSR223 采样器中的自定义代码发送消息。 These are the connection details I have used to create the connection:这些是我用来创建连接的连接详细信息:
def hostName = "127.0.0.1"
def hostPort = 1414
def channelName = "DEV.APP.SVRCONN"
def queueManagerName = "QM1"
def queueName = "DEV.QUEUE.1"
def ff = JmsFactoryFactory.getInstance(WMQConstants.WMQ_PROVIDER)
def cf = ff.createConnectionFactory()
cf.setStringProperty(WMQConstants.WMQ_HOST_NAME, hostName)
cf.setIntProperty(WMQConstants.WMQ_PORT, hostPort)
cf.setStringProperty(WMQConstants.WMQ_CHANNEL, channelName)
cf.setIntProperty(WMQConstants.WMQ_CONNECTION_MODE, WMQConstants.WMQ_CM_CLIENT)
cf.setStringProperty(WMQConstants.WMQ_QUEUE_MANAGER, queueManagerName)
def connInboundQueue = cf.createConnection("mquser", "secretpassword")
def sessInboundQueue = connInboundQueue.createSession(false, Session.AUTO_ACKNOWLEDGE)
def destinationInboundQueue = sessInboundQueue.createQueue(queueName)
connInboundQueue.start()
I'm guessing that I can map these connection credentials to this JMS Point-to-Point Sampler so that I can achieve the same connection, I just don't know how.我猜我可以将这些连接凭据映射到这个 JMS 点对点采样器,以便我可以实现相同的连接,我只是不知道如何。
So to sum up:所以总结一下:
1a. 1a. How can I achieve connection to my two queues using the JMS Point-to-Point Sampler?如何使用 JMS 点对点采样器连接到我的两个队列?
2a. 2a. How can the JMS Point-to-Point Sampler be configured for the scenario I have described above?如何为我上面描述的场景配置 JMS 点对点采样器?
I would appreciate any help.我将不胜感激任何帮助。
I don't think it's currently possible, the options are in:我认为目前不可能,选项在:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.