简体   繁体   中英

JMeter Point-to-Point test of ActiveMQ

I am trying to use the Point-to-Point functionality of JMeter to test 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? 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.

I don't believe ActiveMQ provides a service to automatically respond to requests. ActiveMQ is simply a broker/message router. JMeter is your "client". 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. 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

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:

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. Default is client.messages

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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