简体   繁体   English

JMeter ActiveMQ点对点测试

[英]JMeter Point-to-Point test of ActiveMQ

I am trying to use the Point-to-Point functionality of JMeter to test ActiveMQ. 我正在尝试使用JMeter的点对点功能来测试ActiveMQ。 I am following the documentation here . 我在这里关注文档。

In this page there is the following against the Communication Style 'Request Response': 在此页面中,通讯风格为“请求响应”,以下内容为:

This means that you need at least a service that responds to the requests. 这意味着您至少需要一个响应请求的服务。

What are my options for obtaining a service that responds to the requests? 对于获得响应请求的服务,我有哪些选择? Is it possible to configure ActiveMQ to do this, or to change a JMS property in the Point-to-Point panel in JMeter to get it to do this automatically? 是否可以配置ActiveMQ来执行此操作,或者更改JMeter的“点对点”面板中的JMS属性以使其自动执行此操作? If not, are there any simple apps out there that will just reply to a message and send the reply on another queue? 如果不是,是否有任何简单的应用程序可以答复消息并将答复发送到另一个队列?

I am using ActiveMQ 5.5.1 and JMeter 2.6. 我正在使用ActiveMQ 5.5.1和JMeter 2.6。

I don't believe ActiveMQ provides a service to automatically respond to requests. 我认为ActiveMQ不提供自动响应请求的服务。 ActiveMQ is simply a broker/message router. ActiveMQ只是一个代理/消息路由器。 JMeter is your "client". JMeter是您的“客户”。 So you still need a server (which is the "service" mentioned). 因此,您仍然需要一台服务器(这是提到的“服务”)。 Since you are testing Point-to-Point, you will need a JMS server that uses queues instead of topics. 由于您正在测试点对点,因此您将需要使用队列而不是主题的JMS服务器。 Your options for the server are to write your own code or find some synchronous JMS server code/test tool such as the following: http://activemq.apache.org/how-should-i-implement-request-response-with-jms.html 服务器的选择是编写自己的代码或找到一些同步的JMS服务器代码/测试工具,例如: http : //activemq.apache.org/how-should-i-implement-request-response-with- jms.html

In that example code, you will have to change message.getJMSReplyTo() to some queue name that you will then use in JMeter's JNDI Name Reply Queue (Q.RPL) field in the following line: 在该示例代码中,您将必须将message.getJMSReplyTo()更改为某个队列名称,然后将其用于JMeter的JNDI Name Reply Queue (Q.RPL)字段中的以下行:

this.replyProducer.send(message.getJMSReplyTo(), response);

And in JMeter, you will need to set JNDI Name Request Queue (Q.REQ) to whatever messageQueueName is set to in that example code. 在JMeter中,您需要将JNDI Name Request Queue (Q.REQ)设置为该示例代码中设置的messageQueueName Default is client.messages 默认值为client.messages

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM