Use JMeter to create ACTIVEMQ JMS Point-to-point requests, environment building, request creation, plug-in installation, listener server resources, and more

Source: Internet
Author: User
Tags amq

Recently to do the company's message middleware performance testing, the first thought of the tool is JMeter, online simple search, basically the majority of web testing, had to study the official documents.

This involves JMeter basic terminology or concepts, please refer to the official documentation or Google, where the JMS PTP request is built.

preparatory work:
  • To install the JDK, it is recommended to use more than 1.7 versions and set Java_home
  • download Jmeter and related plugins: Jmeter point I , plugin point i activemq point I
    • jmeter Download compiled package decompression on the line, for convenience, unzip directory I here collectively referred to as Jmeter_home, of course, can also download the source code (need to compile their own source) install
    • unzip activemq
    • jmeterplugins-standard-1.2.1.zip
    • Span style= "color: #3366ff;" > jmeterplugins-extras-1.2.1.zip
    • serveragent-2.2.1.zip
  • Plug-in Installation:
    • Extract the first two plugins separately, and copy the Jmeterplugins-standard.jar and Jmeterplugins-extras.jar from the Lib\ext directory in the extracted folder to the Jmeter_home\lib\ext directory.
    • Decompression Serveragent-2.2.1.zip
  • For JMS type sampler, additional jar packages are required (I'm using Apache ActiveMQ, which will download the AMQ Activemq-all-5.11.1.jar copy under apache-activemq-5.11.1 root directory to jmeter_home\lib directory)
  • Start ACTIVEMQ: Open the DOS window, enter the bin directory under ACTIVEMQ decompression directory, enter the command: Activemq.bat start
    • Tips: Before starting ACTIVEMQ, modify the configuration in Activemq.xml in the Conf directory
      <name= "Openwire"  uri= "tcp://0.0.0.0:61616?maximumconnections= 65535&amp;wireformat.maxframesize=104857600 "/>

      The number marked above is the maximum number of connections, set by itself, if too small will cause the request to be rejected

  • Start ServerAgent: Go to the directory you just unzipped, run as Administrator Startagent.bat

Haha, there is wood has felt very troublesome, a bit impatient? At this point, all preparations are in place, and the jmeter is used below.

To create a JMS peer request:
    • Start JMeter: Enter the Jmeter_home\bin directory, run Jmeter.bat as administrator, this will start two windows, one is DOS window (do not close this window), and the other is the GUI interface of JMeter
    • Add a group of threads
    • Add Samper: Select JMS Point-to-point
    • Configuration sampler, this piece is the focus, because to use Jndi, before the online read some articles, are directly modified Apachejmeter_ Core.jar in the Jemeter.properties file, this way is more troublesome, involves repackaging, here I directly in the JMeter GUI configuration Jndi properties, specifically see:

    • queueconnection Factory: Connection name
    • jndi name request Queue:jndi Send queue name
    • jndi name recieve Queue:jndi receive queue
    • timeout: Timeout duration
    • content: Send message content, here call JMeter function assistant send 512 characters
    • initial Context Factory:org.apache.activemq.jndi.ActiveMQInitialContextFactory (which was previously copied from AMQ to jmeter\lib in the jar package, The jmeter automatically scans to)
    • jndi Properties,queue. Test.request and Queue.Test.Reply, which defines the two variables used earlier
    • provider url:tcp://localhost : 61616, this is the IP and port of the message server, I use the local
  • Here's how to add a listener, add an aggregation report, and then add an [email protected]-Perfmon Metrics collector Listener, other listeners and configuration components to add to your actual needs, with a perfmon attached here Metrics Collector Configuration

    • Now, a JMS PTP sampler has been configured to set up a thread to start running, and here's the result after a run

Aggregated reports:

Server Resource Usage:

Summarize:

The above is just the simple use of tools and plug-ins, the focus of performance testing is not here, the following will talk about distributed testing to solve the bottleneck of the client (online also has a tutorial, but the basic is the official document translation, a bit difficult to understand), followed by analysis of various performance report indicators and scene design, please look forward to, If you have questions about the text, please leave a message or contact me: [Email protected]

Use JMeter to create ACTIVEMQ JMS Point-to-point requests, environment building, request creation, plug-in installation, listener server resources, and more

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.